<!DOCTYPE html>


    <html itemscope itemtype="http://schema.org/QAPage" class="html__responsive">

    <head>

        <title>Como abrir ficheiros .txt em Python? - Stack Overflow em Portugu&#234;s</title>
        <link rel="shortcut icon" href="https://cdn.sstatic.net/Sites/br/Img/favicon.ico?v=20661a71f17b">
        <link rel="apple-touch-icon" href="https://cdn.sstatic.net/Sites/br/Img/apple-touch-icon.png?v=e57f45c9cfaf">
        <link rel="image_src" href="https://cdn.sstatic.net/Sites/br/Img/apple-touch-icon.png?v=e57f45c9cfaf"> 
        <link rel="search" type="application/opensearchdescription+xml" title="Stack Overflow em Portugu&#xEA;s" href="/opensearch.xml">
        <link rel="canonical" href="https://pt.stackoverflow.com/questions/201564/como-abrir-ficheiros-txt-em-python" />
        <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, minimum-scale=1.0">
        <meta property="og:type" content= "website" />
        <meta property="og:url" content="https://pt.stackoverflow.com/questions/201564/como-abrir-ficheiros-txt-em-python"/>
        <meta property="og:site_name" content="Stack Overflow em Portugu&#xEA;s" />
        <meta property="og:image" itemprop="image primaryImageOfPage" content="https://cdn.sstatic.net/Sites/br/Img/apple-touch-icon@2.png?v=2bb2b60be04f" />
        <meta name="twitter:card" content="summary"/>
        <meta name="twitter:domain" content="pt.stackoverflow.com"/>
        <meta name="twitter:site" content="@StackOverflowPT" />
        <meta name="twitter:creator" content="@StackOverflowPT" />
        <meta name="twitter:title" property="og:title" itemprop="name" content="Como abrir ficheiros .txt em Python?" />
        <meta name="twitter:description" property="og:description" itemprop="description" content="Eu quero abrir um ficheiro .txt para leitura mas o python d&#xE1; sempre erro, quer use &#xA;&#xA;f = open(&#x27;ficheiro.txt&#x27;, &quot;r&quot;)&#xD;&#xA;ou &#xA;&#xA;f =open(&#x27;C:\...(diret&#xF3;rio)...\ficheiro.txt&#x27;, &quot;r&quot;)&#xD;&#xA;J&#xE1; criei ficheiros a part..." />

        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
        <script src="https://cdn.sstatic.net/Js/stub.pt-BR.js?v=cccc65b6949a"></script>
    
        <link rel="stylesheet" type="text/css" href="https://cdn.sstatic.net/Shared/stacks.css?v=0ee8a05683e7" >
        <link rel="stylesheet" type="text/css" href="https://cdn.sstatic.net/Sites/br/primary.css?v=c7dce59a7f2a" >

    
            <link rel="alternate" type="application/atom+xml" title="Feed para a pergunta &#x27;Como abrir ficheiros .txt em Python?&#x27;" href="/feeds/question/201564">
            <meta name="twitter:app:country" content="US" />
            <meta name="twitter:app:name:iphone" content="Stack Exchange iOS" />
            <meta name="twitter:app:id:iphone" content="871299723" />
            <meta name="twitter:app:url:iphone" content="se-zaphod://pt.stackoverflow.com/questions/201564/como-abrir-ficheiros-txt-em-python" />
            <meta name="twitter:app:name:ipad" content="Stack Exchange iOS" />
            <meta name="twitter:app:id:ipad" content="871299723" />
            <meta name="twitter:app:url:ipad" content="se-zaphod://pt.stackoverflow.com/questions/201564/como-abrir-ficheiros-txt-em-python" />
            <meta name="twitter:app:name:googleplay" content="Stack Exchange Android">
            <meta name="twitter:app:url:googleplay" content="http://pt.stackoverflow.com/questions/201564/como-abrir-ficheiros-txt-em-python">
            <meta name="twitter:app:id:googleplay" content="com.stackexchange.marvin">
        <script>
            StackExchange.ready(function () {

                    StackExchange.using("snippets", function () {
                        StackExchange.snippets.initSnippetRenderer();
                    });
                    
                StackExchange.using("postValidation", function () {
                    StackExchange.postValidation.initOnBlurAndSubmit($('#post-form'), 2, 'answer');
                });


                StackExchange.question.init({showAnswerHelp:true,totalCommentCount:1,shownCommentCount:1,questionId:201564});

                styleCode();

                    StackExchange.realtime.subscribeToQuestion('526', '201564');
                    StackExchange.using("gps", function () { StackExchange.gps.trackOutboundClicks('#content', '.post-text'); });

                
                
            });
        </script>

        
        
        
        
        
        
        


    <script>
        StackExchange.ready(function () {
            StackExchange.realtime.init('wss://qa.sockets.stackexchange.com');
                StackExchange.realtime.subscribeToReputationNotifications('526');
        StackExchange.realtime.subscribeToTopBarNotifications('526');
        });
    </script>
    <script>
        StackExchange.init({"locale":"pt-BR","serverTime":1592588753,"routeName":"Questions/Show","stackAuthUrl":"https://stackauth.com","networkMetaHostname":"meta.stackexchange.com","site":{"name":"Stack Overflow em Português","description":"Perguntas e respostas para programadores profissionais e entusiastas","isNoticesTabEnabled":true,"enableNewTagCreationWarning":true,"insertSpaceAfterNameTabCompletion":false,"id":526,"childUrl":"https://pt.meta.stackoverflow.com","negativeVoteScoreFloor":null,"enableSocialMediaInSharePopup":true,"protocol":"https"},"user":{"fkey":"f4b78665943d49f72333c3d80d4c7823069e60242e13087f67ce62e267f9013f","tid":"69755307-9311-68c2-0848-82c854a0f32e","rep":0,"isAnonymous":true,"isAnonymousNetworkWide":true},"realtime":{"newest":true,"active":true,"tagged":true,"staleDisconnectIntervalInHours":0},"events":{"postType":{"question":1},"postEditionSection":{"title":1,"body":2,"tags":3}},"story":{"minCompleteBodyLength":75,"likedTagsMaxLength":300,"dislikedTagsMaxLength":300},"jobPreferences":{"maxNumDeveloperRoles":2,"maxNumIndustries":4},"svgIconPath":"https://cdn.sstatic.net/Img/svg-icons","svgIconHash":"7aa1e7a5b07a"}, {"userProfile":{},"userMessaging":{"showNewFeatureNotice":true},"tags":{"allowNonAsciiTags":true},"subscriptions":{"defaultMaxTrueUpSeats":1000},"snippets":{"renderDomain":"stacksnippets.net","snippetsEnabled":true},"slack":{"sidebarAdDismissCookie":"slack-sidebar-ad","sidebarAdDismissCookieExpirationDays":60.0},"site":{"allowImageUploads":true,"enableImgurHttps":true,"enableUserHovercards":true,"forceHttpsImages":true,"styleCode":true},"paths":{},"monitoring":{"clientTimingsAbsoluteTimeout":30000,"clientTimingsDebounceTimeout":1000},"mentions":{"maxNumUsersInDropdown":50},"markdown":{"asteriskIntraWordEmphasis":true,"enableCommonmark":true},"flags":{"allowRetractingCommentFlags":true,"allowRetractingFlags":true},"comments":{},"accounts":{"currentPasswordRequiredForChangingStackIdPassword":true}});
        StackExchange.using.setCacheBreakers({"js/adops.pt-BR.js":"22a9bd59b1e9","js/ask.pt-BR.js":"720f326ec285","js/begin-edit-event.pt-BR.js":"cb9965ad8784","js/events.pt-BR.js":"3116bb119f74","js/explore-qlist.pt-BR.js":"222b04ca33bc","js/full-anon.pt-BR.js":"6d6ed53cbfef","js/full.pt-BR.js":"8334215aa80c","js/help.pt-BR.js":"c0abac83854e","js/inline-tag-editing.pt-BR.js":"7c0a7510961d","js/keyboard-shortcuts.pt-BR.js":"1f948be5077e","js/mobile.pt-BR.js":"383dbcde5aaa","js/moderator.pt-BR.js":"ab8495721697","js/postCollections-transpiled.pt-BR.js":"d7aed0b03eb0","js/post-validation.pt-BR.js":"62bd63af0b10","js/prettify-full.pt-BR.js":"d9ee12a0cdd3","js/question-editor.pt-BR.js":"","js/review.pt-BR.js":"5290476a5c51","js/revisions.pt-BR.js":"d810e9b8bf62","js/tageditor.pt-BR.js":"2d701578a45d","js/tageditornew.pt-BR.js":"394166046a1e","js/tagsuggestions.pt-BR.js":"7d4837374309","js/wmd.pt-BR.js":"f461942cb1b9","js/snippet-javascript-codemirror.pt-BR.js":"20345479649c","js/markdown-it-loader.pt-BR.js":"a51a4850b0ea"});
        StackExchange.using("gps", function() {
             StackExchange.gps.init(true);
        });
    </script>
    <noscript id="noscript-css"><style>body,.top-bar{margin-top:1.9em}</style></noscript>
    </head>
    <body class="question-page unified-theme">
    <div id="notify-container"></div>
    <div id="custom-header"></div>
        
<header class="top-bar js-top-bar top-bar__network _fixed">
    <div class="wmx12 mx-auto grid ai-center h100" role="menubar">
        <div class="-main grid--cell">
                <a href="#" class="left-sidebar-toggle p0 ai-center jc-center js-left-sidebar-toggle" role="menuitem" aria-haspopup="true" aria-controls="left-sidebar" aria-expanded="false"><span class="ps-relative"></span></a>
                <div class="topbar-dialog leftnav-dialog js-leftnav-dialog dno">
                    <div class="left-sidebar js-unpinned-left-sidebar" data-can-be="left-sidebar" data-is-here-when="sm"></div>
                </div>
                    <a href="https://pt.stackoverflow.com" class="-logo js-gps-track"
                        data-gps-track="top_nav.click({is_current:false, location:2, destination:8})">
                        <span class="-img _glyph">Stack Overflow em Portugu&#xEA;s</span>
                    </a>



        </div>


            <form id="search" role="search" action=/search method="get" class="grid--cell fl-grow1 searchbar px12 js-searchbar " autocomplete="off">
                    <div class="ps-relative">
                        <input name="q"
                               type="text"
                               placeholder="Pesquisar..."
                               value=""
                               autocomplete="off"
                               maxlength="240"
                               class="s-input s-input__search js-search-field "
                               aria-label="Pesquisar"
                               aria-controls="top-search" 
                               data-controller="s-popover"
                               data-action="focus->s-popover#show"
                               data-s-popover-placement="bottom-start"/>
                        <svg aria-hidden="true" class="s-input-icon s-input-icon__search svg-icon iconSearch" width="18" height="18" viewBox="0 0 18 18"><path d="M18 16.5l-5.14-5.18h-.35a7 7 0 10-1.19 1.19v.35L16.5 18l1.5-1.5zM12 7A5 5 0 112 7a5 5 0 0110 0z"/></svg>
                        <div class="s-popover p0 wmx100 wmn4 sm:wmn-initial js-top-search-popover s-popover--arrow__tl" id="top-search" role="menu">
    <div class="js-spinner p24 grid ai-center jc-center d-none">
        <div class="s-spinner s-spinner__sm fc-orange-400">
            <div class="v-visible-sr">Loading&#x2026;</div>
        </div>
    </div>

    <span class="v-visible-sr js-screen-reader-info"></span>
    <div class="js-ac-results overflow-y-auto hmx3 d-none"></div>

    <div class="js-search-hints" aria-describedby="Tips for searching"></div>
</div>
                    </div>
            </form>
        
        

<ol class="overflow-x-auto ml-auto -secondary grid ai-center list-reset h100 user-logged-out" role="presentation">
        <li class="-item searchbar-trigger"><a href="#" class="-link js-searchbar-trigger" role="button" aria-label="Pesquisar" aria-haspopup="true" aria-controls="search" title="Click to show search"><svg aria-hidden="true" class="svg-icon iconSearch" width="18" height="18" viewBox="0 0 18 18"><path d="M18 16.5l-5.14-5.18h-.35a7 7 0 10-1.19 1.19v.35L16.5 18l1.5-1.5zM12 7A5 5 0 112 7a5 5 0 0110 0z"/></svg></a></li>
        <li class="-item inbox-button-item">
            <a href="#" class="-link js-inbox-button"
               aria-label="Caixa de entrada" title="&#xDA;ltimas mensagens no inbox" role="menuitem" aria-haspopup="true" aria-expanded="false" data-unread-count="0">
                <svg aria-hidden="true" class="svg-icon iconInbox" width="20" height="18" viewBox="0 0 20 18"><path d="M4.63 1h10.56a2 2 0 011.94 1.35L20 10.79V15a2 2 0 01-2 2H2a2 2 0 01-2-2v-4.21l2.78-8.44c.25-.8 1-1.36 1.85-1.35zm8.28 12l2-2h2.95l-2.44-7.32a1 1 0 00-.95-.68H5.35a1 1 0 00-.95.68L1.96 11h2.95l2 2h6z"/></svg>
                <span class="indicator-badge js-unread-count _important d-none">0</span>
            </a>
        </li>
        <li class="-item achievements-button-item">
            <a href="#" class="-link js-achievements-button" data-unread-class="_highlighted-positive"
               aria-label="Realiza&#xE7;&#xF5;es" title="Conquistas recentes: reputa&#xE7;&#xE3;o, medalhas e privil&#xE9;gios obtidos" role="menuitem" aria-haspopup="true" aria-expanded="false" data-unread-count="0" data-lit-up="false">
                <svg aria-hidden="true" class="svg-icon iconAchievements" width="18" height="18" viewBox="0 0 18 18"><path d="M15 2V1H3v1H0v4c0 1.6 1.4 3 3 3v1c.4 1.5 3 2.6 5 3v2H5s-1 1.5-1 2h10c0-.4-1-2-1-2h-3v-2c2-.4 4.6-1.5 5-3V9c1.6-.2 3-1.4 3-3V2h-3zM3 7c-.5 0-1-.5-1-1V4h1v3zm8.4 2.5L9 8 6.6 9.4l1-2.7L5 5h3l1-2.7L10 5h2.8l-2.3 1.8 1 2.7h-.1zM16 6c0 .5-.5 1-1 1V4h1v2z"/></svg>
                <span class="indicator-badge js-unread-count _positive d-none">+0</span>
            </a>
        </li>
        <li class="-item help-button-item">
            <a href="#" class="-link js-help-button" title="Central de ajuda e outros recursos" role="menuitem" aria-haspopup="true" aria-controls="topbar-help-dialog"
               data-ga="[&quot;top navigation&quot;,&quot;help menu click&quot;,null,null,null]"><svg aria-hidden="true" class="svg-icon iconHelp" width="18" height="18" viewBox="0 0 18 18"><path d="M9 1a8 8 0 100 16A8 8 0 009 1zm.81 12.13c-.02.71-.55 1.15-1.24 1.13-.66-.02-1.17-.49-1.15-1.2.02-.72.56-1.18 1.22-1.16.7.03 1.2.51 1.17 1.23zM11.77 8c-.3.34-.65.65-1.02.91l-.53.37c-.26.2-.42.43-.5.69a4 4 0 00-.09.75c0 .05-.03.16-.18.16H7.88c-.16 0-.18-.1-.18-.15.03-.66.12-1.21.4-1.66.4-.49.88-.9 1.43-1.22.16-.12.28-.25.38-.39a1.34 1.34 0 00.02-1.71c-.24-.31-.51-.46-1.03-.46-.51 0-.8.26-1.02.6-.21.33-.18.73-.18 1.1H5.75c0-1.38.35-2.25 1.1-2.76.52-.35 1.17-.5 1.93-.5 1 0 1.79.18 2.49.71.64.5.98 1.18.98 2.12 0 .57-.2 1.05-.48 1.44z"/></svg></a>
        </li>
        <div class="topbar-dialog help-dialog js-help-dialog dno" id="topbar-help-dialog" role="menu">
            <div class="modal-content">
                <ul>
                        <li>
                            <a href="/tour" class="js-gps-track" data-gps-track="help_popup.click({ item_type:1 })"
                               data-ga="[&quot;top navigation&quot;,&quot;tour submenu click&quot;,null,null,null]">
                                Tour
                                <span class="item-summary">
                                    Comece aqui para obter uma vis&#xE3;o geral r&#xE1;pida do site
                                </span>
                            </a>
                        </li>
                    <li>
                        <a href="/help" class="js-gps-track"
                           data-gps-track="help_popup.click({ item_type:4 })"
                           data-ga="[&quot;top navigation&quot;,&quot;help center&quot;,null,null,null]">
                            Central de ajuda
                            <span class="item-summary">
                                Respostas detalhadas a qualquer pergunta que voc&#xEA; tiver
                            </span>
                        </a>
                    </li>
                                <li>
                                    <a href="https://pt.meta.stackoverflow.com" class="js-gps-track" data-gps-track="help_popup.click({ item_type:2 })"
                                       data-ga="[&quot;top navigation&quot;,&quot;meta submenu click&quot;,null,null,null]">
                                        Meta
                                        <span class="item-summary">
                                            Discutir o funcionamento e as pol&#xED;ticas deste site
                                        </span>
                                    </a>
                                </li>
                            <li>
                                <a href="https://stackoverflow.com/company/about" class="js-gps-track" data-gps-track="help_popup.click({ item_type:6 })"
                                   data-ga="[&quot;top navigation&quot;,&quot;about us submenu click&quot;,null,null,null]">
                                    Sobre N&#xF3;s
                                    <span class="item-summary">
                                        Saiba mais sobre a empresa Stack Overflow
                                    </span>
                                </a>
                            </li>
                            <li>
                                <a href="https://stackoverflowbusiness.com/?ref=topbar_help" class="js-gps-track" data-gps-track="help_popup.click({ item_type:7 })"
                                   data-ga="[&quot;top navigation&quot;,&quot;business submenu click&quot;,null,null,null]">
                                    Neg&#xF3;cios
                                    <span class="item-summary">
                                        Saiba mais sobre a contrata&#xE7;&#xE3;o de desenvolvedores ou publica&#xE7;&#xE3;o de an&#xFA;ncios conosco
                                    </span>
                                </a>
                            </li>
                </ul>
            </div>
        </div>
        <li class="-item site-switcher-item">
            <a href="https://stackexchange.com" class="-link js-site-switcher-button js-gps-track" data-gps-track="site_switcher.show"
               aria-label="Site switcher"
               title="Todos os 177 sites do Stack Exchange"
               role="menuitem" aria-haspopup="true" aria-expanded="false"
               data-ga="[&quot;top navigation&quot;,&quot;stack exchange click&quot;,null,null,null]">
                <svg aria-hidden="true" class="svg-icon iconStackExchange" width="18" height="18" viewBox="0 0 18 18"><path d="M15 1H3a2 2 0 00-2 2v2h16V3a2 2 0 00-2-2zM1 13c0 1.1.9 2 2 2h8v3l3-3h1a2 2 0 002-2v-2H1v2zm16-7H1v4h16V6z"/></svg>
            </a>
        </li>

            <li class="-ctas">
                            <a href="https://pt.stackoverflow.com/users/login?ssrc=head&returnurl=https%3a%2f%2fpt.stackoverflow.com%2fquestions%2f201564%2fcomo-abrir-ficheiros-txt-em-python%3fanswertab%3dvotes" class="login-link s-btn s-btn__filled py8 js-gps-track" rel="nofollow"
                               data-gps-track="login.click" data-ga="[&quot;top navigation&quot;,&quot;login button click&quot;,null,null,null]">Log-in</a>
                            <a href="https://pt.stackoverflow.com/users/signup?ssrc=head&returnurl=https%3a%2f%2fpt.stackoverflow.com%2fquestions%2f201564%2fcomo-abrir-ficheiros-txt-em-python%3fanswertab%3dvotes" class="login-link s-btn s-btn__primary py8" rel="nofollow" data-ga="[&quot;sign up&quot;,&quot;Sign Up Navigation&quot;,&quot;Header&quot;,null,null]">Registrar-se</a>

            </li>

    <li class="js-topbar-dialog-corral" role="presentation">
            

    <div class="topbar-dialog siteSwitcher-dialog dno" role="menu">
        <div class="header">
            <h3>
                <a href="https://pt.stackoverflow.com">comunidade atual</a>
            </h3>
        </div>
        <div class="modal-content bg-powder-050">
            <ul class="current-site">
                    <li class="grid">
                            <div class="fl1">
                <a href="https://pt.stackoverflow.com"
       class="current-site-link site-link js-gps-track grid gs8 gsx"
       data-id="526"
       data-gps-track="site_switcher.click({ item_type:3 })">
        <div class="favicon favicon-br site-icon grid--cell" title="Stack Overflow em Português"></div>
        <span class="grid--cell fl1">
            Stack Overflow em Portugu&#xEA;s
        </span>
    </a>

    </div>
    <div class="related-links">
            <a href="https://pt.stackoverflow.com/help" class="js-gps-track" data-gps-track="site_switcher.click({ item_type:14 })">ajuda</a>
            <a href="https://chat.stackexchange.com?tab=site&amp;host=pt.stackoverflow.com" class="js-gps-track" data-gps-track="site_switcher.click({ item_type:6 })">chat</a>
    </div>

                    </li>
                    <li class="related-site grid">
                            <div class="L-shaped-icon-container">
        <span class="L-shaped-icon"></span>
    </div>

                            <a href="https://pt.meta.stackoverflow.com"
       class=" site-link js-gps-track grid gs8 gsx"
       data-id="527"
       data-gps-track="site.switch({ target_site:527, item_type:3 }),site_switcher.click({ item_type:4 })">
        <div class="favicon favicon-brmeta site-icon grid--cell" title="Stack Overflow em Português Meta"></div>
        <span class="grid--cell fl1">
            Stack Overflow em Portugu&#xEA;s Meta
        </span>
    </a>

                    </li>
            </ul>
        </div>

        <div class="header" id="your-communities-header">
            <h3>
suas comunidades            </h3>

        </div>
        <div class="modal-content" id="your-communities-section">

                <div class="call-to-login">
Fa&#231;a <a href="https://pt.stackoverflow.com/users/login?ssrc=site_switcher&amp;returnurl=https%3a%2f%2fpt.stackoverflow.com%2fquestions%2f201564%2fcomo-abrir-ficheiros-txt-em-python%3fanswertab%3dvotes" class="login-link js-gps-track" data-gps-track="site_switcher.click({ item_type:11 })">log in</a> ou <a href="https://pt.stackoverflow.com/users/signup?ssrc=site_switcher&amp;returnurl=https%3a%2f%2fpt.stackoverflow.com%2fquestions%2f201564%2fcomo-abrir-ficheiros-txt-em-python%3fanswertab%3dvotes" class="login-link js-gps-track" data-gps-track="site_switcher.click({ item_type:10 })">registre-se</a> para personalizar suas comunidades                </div>
        </div>

        <div class="header">
            <h3><a href="https://stackexchange.com/sites">mais comunidades stack exchange</a>
            </h3>
            <a href="https://stackoverflow.blog" class="fr">Blog da empresa</a>
        </div>
        <div class="modal-content">
                <div class="child-content"></div>
        </div>        
    </div>

    </li>
</ol>
    </div>
</header>
    <div id="js-gdpr-consent-banner" class="p8 ff-sans ps-fixed b0 l0 r0 z-banner" role="banner" aria-hidden="false" style="background-color: #3b4045; color: white;"> 
        <div class="wmx8 mx-auto grid grid__center" role="alertdialog" aria-describedby="notice-message">
            <div class="grid--cell mr12" aria-label="notice-message">
                <p class="mb0 lh-lg">
                    Ao usar nosso site, voc&#234; reconhece que leu e entendeu nossa <a class="s-link s-link__inherit td-underline fc-white" target="_blank" href="https://stackoverflow.com/legal/cookie-policy">Pol&#237;tica de Cookies</a>, <a class="s-link s-link__inherit td-underline fc-white" target="_blank" href="https://stackoverflow.com/legal/privacy-policy">Pol&#237;tica de Privacidade</a> e nossos <a class="s-link s-link__inherit td-underline fc-white" target="_blank" href="https://stackoverflow.com/legal/terms-of-service/public">Termos de Servi&#231;o</a>.
                </p>
            </div>
            <div class="grid--cell">
                <a class="s-btn s-btn__muted s-btn__icon js-notice-close" aria-label="notice-dismiss">
                    <svg aria-hidden="true" class="svg-icon iconClear" width="18" height="18" viewBox="0 0 18 18"><path d="M15 4.41L13.59 3 9 7.59 4.41 3 3 4.41 7.59 9 3 13.59 4.41 15 9 10.41 13.59 15 15 13.59 10.41 9 15 4.41z"/></svg>
                </a>
            </div>
        </div>
    </div>

    <script>
        StackExchange.ready(function () { StackExchange.topbar.init(); });
StackExchange.scrollPadding.setPaddingTop(50, 10);    </script>



            

        
    

<div class="py24 bg-black-750 fc-black-200 sm:pt24 sm:pb24 ps-relative js-dismissable-hero">
    <div class="px12 grid ai-center jc-center mx-auto wmx12 sm:fd-column">
        <div class="grid--cell wmx3 fs-body2 mr64 md:mr32 sm:mr0 sm:ta-center sm:mr0 sm:ta-center">
            <p>Stack Overflow em Portugu&#xEA;s &#xE9; um site de perguntas e respostas para programadores profissionais e entusiastas. Leva apenas um minuto para se inscrever.</p>

            <a href="/users/signup?ssrc=hero&amp;returnurl=https%3a%2f%2fpt.stackoverflow.com%2fquestions%2f201564%2fcomo-abrir-ficheiros-txt-em-python%3fanswertab%3dvotes" class="s-btn s-btn__primary">Inscreva-se para participar desta comunidade</a>
        </div>
        <div class="grid fd-column ai-center wmn3 sm:wmn-initial sm:mt32 hero-background">
            <div class="grid ai-center mb24 sm:mb16">
                <div class="grid--cell mr16">
                    <img width="31" src="https://cdn.sstatic.net/Img/hero/anonymousHeroQuestions.svg?v=748bfb046b78">
                </div>
                <div class="grid--cell">
                    Qualquer pessoa pode fazer uma pergunta
                </div>
            </div>
            <div class="grid ai-center mb24 sm:mb16">
                <div class="grid--cell mr16">
                    <img width="35" src="https://cdn.sstatic.net/Img/hero/anonymousHeroAnswers.svg?v=d5348b00eddc">
                </div>
                <div class="grid--cell">
                    Qualquer um pode responder
                </div>
            </div>
            <div class="grid ai-center">
                <div class="grid--cell mr16">
                    <img width="24" src="https://cdn.sstatic.net/Img/hero/anonymousHeroUpvote.svg?v=af2bb70d5d1b">
                </div>
                <div class="grid--cell wmx2">
                    As melhores respostas recebem votos positivos e sobem para os primeiros lugares
                </div>
            </div>
        </div>
            <div class="grid--cell as-start md:ps-absolute t8 r8">
                <button class="s-btn s-btn__muted p8 js-dismiss">
                    <svg aria-hidden="true" class="svg-icon iconClear" width="18" height="18" viewBox="0 0 18 18"><path d="M15 4.41L13.59 3 9 7.59 4.41 3 3 4.41 7.59 9 3 13.59 4.41 15 9 10.41 13.59 15 15 13.59 10.41 9 15 4.41z"/></svg>
                </button>
            </div>
    </div>
</div>

<script>
    StackExchange.ready(function () {
        StackExchange.Hero.init("nso", "a");

        var location = 0;
        if ($("body").hasClass("questions-page")) {
            location = 1;
        } else if ($("body").hasClass("question-page")) {
            location = 1;
        } else if ($("body").hasClass("faq-page")) {
            location = 5;
        } else if ($("body").hasClass("home-page")) {
            location = 3;
        }

        $('.js-cta-button').click(function () {
            StackExchange.using("gps", function () {
                StackExchange.gps.track("hero.action", { hero_action_type: 'cta', location: location }, true);
            });
        });

        // TODO: we should review the class names and whatnot in use here. Older heroes use id selectors, the newer
        // sticky question hero on SO has a .js-dismiss class instead, but it's apparently not used anywhere... 
        // It's not great. Ideally we'd have a set of classes in the partials above that would correspond to 
        // the behaviours we want here in a more clear way. 

        // sticky question-page hero at the bottom of the page on SO
        $('.js-dismiss').on('click', function () {
            StackExchange.using("gps", function () {
                StackExchange.gps.track("hero.action", { hero_action_type: "close", location: location }, true);
            });
            StackExchange.Hero.dismiss();
            $(".js-dismissable-hero").fadeOut("fast");
        });
    });
</script>



    <div class="container">
            

<div id="left-sidebar" data-is-here-when="md lg" class="left-sidebar js-pinned-left-sidebar ps-relative">
    <div class="left-sidebar--sticky-container js-sticky-leftnav">
        <nav role="navigation">
            <ol class="nav-links">
        <li class="">
            <a
                href="/"
                class="pl8 js-gps-track nav-links--link"
                
                data-gps-track="top_nav.click({is_current:false, location:2, destination:8})">
Home            </a>
        </li>
                <li>
                    <ol class="nav-links">
                                <li class=" youarehere">
            <a id="nav-questions"
                href="/questions"
                class="pl8 js-gps-track nav-links--link"
                
                data-gps-track="top_nav.click({is_current:true, location:2, destination:1})">
Perguntas            </a>
        </li>

        <li class="">
            <a id="nav-tags"
                href="/tags"
                class="pl8 js-gps-track nav-links--link"
                
                data-gps-track="top_nav.click({is_current:false, location:2, destination:2})">
Tags            </a>
        </li>
        <li class="">
            <a id="nav-users"
                href="/users"
                class="pl8 js-gps-track nav-links--link"
                
                data-gps-track="top_nav.click({is_current:false, location:2, destination:3})">
Usu&#xE1;rios            </a>
        </li>
        <li class="">
            <a id="nav-unanswered"
                href="/unanswered"
                class="pl8 js-gps-track nav-links--link"
                
                data-gps-track="top_nav.click({is_current:false, location:2, destination:5})">
Sem resposta            </a>
        </li>
                    </ol>
                </li>
            </ol>
        </nav>
    </div>



</div>



        <div id="content" class="snippet-hidden">

            
<div itemprop="mainEntity" itemscope itemtype="http://schema.org/Question">
    <link itemprop="image" href="https://cdn.sstatic.net/Sites/br/Img/apple-touch-icon.png?v=e57f45c9cfaf">

    <div class="inner-content clearfix">

        

            <div id="question-header" class="grid sm:fd-column">
                        <h1 itemprop="name" class="grid--cell fs-headline1 fl1 ow-break-word mb8"><a href="/questions/201564/como-abrir-ficheiros-txt-em-python" class="question-hyperlink">Como abrir ficheiros .txt em Python?</a></h1>

                <div class="ml12 aside-cta grid--cell print:d-none sm:ml0 sm:mb12 sm:order-first sm:as-end">
                    
    <a href="/questions/ask" class="ws-nowrap s-btn s-btn__primary" >
        Fa&#xE7;a uma pergunta
    </a>

                </div>
            </div>
            <div class="grid fw-wrap pb8 mb16 bb bc-black-2">
                    <div class="grid--cell ws-nowrap mr16 mb8" title="2017-04-30 15:48:37Z">
                        <span class="fc-light mr2">Perguntada</span>
                        <time itemprop="dateCreated" datetime="2017-04-30T15:48:37">3 anos, 1 mes atr&#225;s</time>
                    </div>
                        <div class="grid--cell ws-nowrap mr16 mb8">
                            <span class="fc-light mr2">Ativa</span>
                            <a href="?lastactivity" class="s-link s-link__inherit" title="2018-01-30 01:06:18Z">2 anos, 4 meses atr&#225;s</a>
                        </div>
                    <div class="grid--cell ws-nowrap mb8" title="Visto 2.814 vezes">
                        <span class="fc-light mr2">Vista</span>
                        3mil vezes
                    </div>
            </div>
            <div id="mainbar" role="main" aria-label="pergunta e respostas">

                
<div class="question" data-questionid="201564"  id="question">
    <style>.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{
            margin-bottom:0;
}
</style>
<div id="dfp-tlb" class="everyonelovesstackoverflow everyoneloves__top-leaderboard mb8 mx-auto"></div>

    <div class="post-layout">
        <div class="votecell post-layout--left">
            <div class="js-voting-container grid fd-column ai-stretch gs4 fc-black-200" data-post-id="201564">
        <button class="js-vote-up-btn grid--cell s-btn s-btn__unset c-pointer" data-controller="s-tooltip" data-s-tooltip-placement="right" title="Upvote this pergunta if you find it clear and useful." aria-pressed="false" aria-label="Up vote" data-selected-classes="fc-theme-primary"><svg aria-hidden="true" class="m0 svg-icon iconArrowUpLg" width="36" height="36" viewBox="0 0 36 36"><path d="M2 26h32L18 10 2 26z"/></svg></button>
        <div class="js-vote-count grid--cell fc-black-500 fs-title grid fd-column ai-center" itemprop="upvoteCount" data-value="0">0</div>
        <button class="js-vote-down-btn grid--cell s-btn s-btn__unset c-pointer" data-controller="s-tooltip" data-s-tooltip-placement="right" title="Downvote this pergunta if you find it unclear or not useful." aria-pressed="false" aria-label="Down vote" data-selected-classes="fc-theme-primary"><svg aria-hidden="true" class="m0 svg-icon iconArrowDownLg" width="36" height="36" viewBox="0 0 36 36"><path d="M2 10h32L18 26 2 10z"/></svg></button>

        <button class="js-bookmark-btn s-btn s-btn__unset c-pointer py4 js-gps-track" 
                data-controller="s-tooltip" data-s-tooltip-placement="right" title="Marcar como pergunta favorita."
                aria-pressed="false" aria-label="Favorito" data-selected-classes="fc-yellow-600"
                data-gps-track="post.click({ item: 1, priv: 0, post_type: 1 })">
            <svg aria-hidden="true" class="svg-icon iconBookmark" width="18" height="18" viewBox="0 0 18 18"><path d="M6 1a2 2 0 00-2 2v14l5-4 5 4V3a2 2 0 00-2-2H6zm3.9 3.83h2.9l-2.35 1.7.9 2.77L9 7.59l-2.35 1.7.9-2.76-2.35-1.7h2.9L9 2.06l.9 2.77z"/></svg>
            <div class="js-bookmark-count mt4 d-none" data-value=""></div>
        </button>
    

    
        <a class="js-post-issue grid--cell s-btn s-btn__unset c-pointer py6 mx-auto" href="/posts/201564/timeline" data-shortcut="T" data-controller="s-tooltip" data-s-tooltip-placement="right" title="Show activity on this post." aria-label="Linha do tempo"><svg aria-hidden="true" class="mln2 mr0 svg-icon iconHistory" width="19" height="18" viewBox="0 0 19 18"><path d="M3 9a8 8 0 113.73 6.77L8.2 14.3A6 6 0 105 9l3.01-.01-4 4-4-4h3L3 9zm7-4h1.01L11 9.36l3.22 2.1-.6.93L10 10V5z"/></svg></a>

</div>

        </div>

        

<div class="postcell post-layout--right">
    
    <div class="post-text" itemprop="text">
                    
<p>Eu quero abrir um ficheiro .txt para leitura mas o python dá sempre erro, quer use </p>

<pre><code>f = open('ficheiro.txt', "r")
</code></pre>

<p>ou </p>

<pre><code>f =open('C:\...(diretório)...\ficheiro.txt', "r")
</code></pre>

<p>Já criei ficheiros a partir do python para saber onde eles são guardados e colocar lá o ficheiro que quero, e mesmo assim não funciona. Apenas dá quando copio o conteúdo que quero para o ficheiro que crio com o python, mas dá muito trabalho.</p>

<p>O python levanta sempre este erro:</p>

<pre><code>IOError: [Errno 2] No such file or directory: 'ficheiro.txt'
</code></pre>

<p>O que posso fazer para resolver o problema?</p>
    </div>

        <div class="post-taglist grid gs4 gsy fd-column">
            <div class="grid ps-relative d-block">
                <a href="/questions/tagged/python" class="post-tag" title="mostrar perguntas com a tag &#39;python&#39;" rel="tag">python</a> 
            </div>
        </div>

    <div class="mb0 ">
        <div class="mt16 grid gs8 gsy fw-wrap jc-end ai-start pt4">
            <div class="grid--cell mr16" style="flex: 1 1 100px;">
                

<div class="post-menu">
    <a href="/q/201564"
       rel="nofollow"
       itemprop="url"
       class="js-share-link js-gps-track"
       title="permalink curto para esta pergunta"
       data-gps-track="post.click({ item: 2, priv: 0, post_type: 1 })"
       data-controller="se-share-sheet"
       data-se-share-sheet-title="Compartilhe um link para esta pergunta"
       data-se-share-sheet-subtitle=""
       data-se-share-sheet-post-type="question"
       data-se-share-sheet-social="facebook twitter "
       data-se-share-sheet-location="1"
       data-se-share-sheet-license-url="https%3a%2f%2fcreativecommons.org%2flicenses%2fby-sa%2f3.0%2f"
       data-se-share-sheet-license-name="CC BY-SA 3.0"
       data-s-popover-placement="bottom-start">compartilhar</a>
        <span class="lsep">|</span>
                <a href="/posts/201564/edit" class="suggest-edit-post js-gps-track" data-gps-track="post.click({ item: 6, priv: 0, post_type: 1 })" title="">melhorar esta pergunta</a>
        <span class="lsep">|</span>
    <button id="btnFollowPost-201564" class="s-btn s-btn__link fc-black-400 h:fc-black-700 pb2 js-follow-post js-follow-question js-gps-track" role="button"
            data-gps-track="post.click({ item: 14, priv: 0, post_type: 1 })"
            data-controller="s-tooltip " data-s-tooltip-placement="bottom"
            data-s-popover-placement="bottom" aria-controls=""
            title="Siga esta pergunta para receber notifica&#xE7;&#xF5;es">
        seguir
    </button>
        <span class="lsep">|</span>
</div>

            </div>

                <div class="post-signature grid--cell">
<div class="user-info user-hover">
    <div class="user-action-time">
        <a href="/posts/201564/revisions" title="mostrar todas as edições desta publicação"
                         class="js-gps-track"
                         data-gps-track="post.click({ item: 4, priv: 0, post_type: 1 })">editada <span title="2017-05-01 20:16:28Z" class="relativetime">1/05/17 às 20:16</span></a>
    </div>
    <div class="user-gravatar32">
        <a href="/users/2999/leonel-sanches-da-silva"><div class="gravatar-wrapper-32"><img src="https://i.stack.imgur.com/oWffr.jpg?s=32&amp;g=1" alt="" width="32" height="32" class="bar-sm"></div></a>
    </div>
    <div class="user-details">
        <a href="/users/2999/leonel-sanches-da-silva">Leonel Sanches da Silva</a>
        <div class="-flair">
            <span class="reputation-score" title="pontos de reputa&amp;#231;&amp;#227;o 87.086" dir="ltr">87,1mil</span><span title="8 medalhas de ouro" aria-hidden="true"><span class="badge1"></span><span class="badgecount">8</span></span><span class="v-visible-sr">8 medalhas de ouro</span><span title="111 medalhas de prata" aria-hidden="true"><span class="badge2"></span><span class="badgecount">111</span></span><span class="v-visible-sr">111 medalhas de prata</span><span title="217 medalhas de bronze" aria-hidden="true"><span class="badge3"></span><span class="badgecount">217</span></span><span class="v-visible-sr">217 medalhas de bronze</span>
        </div>
    </div>
</div>                </div>
            <div class="post-signature owner grid--cell">
                <div class="user-info ">
    <div class="user-action-time">
        perguntada <span title="2017-04-30 15:48:37Z" class="relativetime">30/04/17 às 15:48</span>
    </div>
    <div class="user-gravatar32">
        <a href="/users/74945/hugo-azevedo"><div class="gravatar-wrapper-32"><img src="https://lh4.googleusercontent.com/-wesJ6fCW4NU/AAAAAAAAAAI/AAAAAAAAA5c/jTEYCkVzTUY/photo.jpg?sz=32" alt="" width="32" height="32" class="bar-sm"></div></a>
    </div>
    <div class="user-details" itemprop="author" itemscope itemtype="http://schema.org/Person">
        <a href="/users/74945/hugo-azevedo">Hugo Azevedo</a><span class="d-none" itemprop="name">Hugo Azevedo</span>
        <div class="-flair">
            <span class="reputation-score" title="pontos de reputa&amp;#231;&amp;#227;o " dir="ltr">51</span><span title="2 medalhas de prata" aria-hidden="true"><span class="badge2"></span><span class="badgecount">2</span></span><span class="v-visible-sr">2 medalhas de prata</span><span title="3 medalhas de bronze" aria-hidden="true"><span class="badge3"></span><span class="badgecount">3</span></span><span class="v-visible-sr">3 medalhas de bronze</span>
        </div>
    </div>
</div>

            </div>
        </div>
    </div>
    
</div>


                <div class="post-layout--right">
        <div id="comments-201564" class="comments js-comments-container bt bc-black-2 mt12 " data-post-id="201564" data-min-length="15">
            <ul class="comments-list js-comments-list"
                    data-remaining-comments-count="0"
                    data-canpost="false"
                    data-cansee="true"
                    data-comments-unavailable="false"
                    data-addlink-disabled="true">

                        <li id="comment-413166" class="comment js-comment " data-comment-id="413166">
        <div class="js-comment-actions comment-actions">
            <div class="comment-score js-comment-edit-hide">
            </div>
        </div>
        <div class="comment-text js-comment-text-and-form">
            <div class="comment-body js-comment-edit-hide">
                
                <span class="comment-copy">O ideal seria que voce colocasse o codigo real (ctrl-c, ctrl-v) e a mensagem do erro no corpo da sua pergunta, da forma que vc escreveu ficou muito abrangente, dificil de entender qual &#233; o problema.</span>
                
&ndash;&nbsp;<a href="/users/7412/sidon"
                       title="6.275 reputa&#xE7;&#xE3;o"
                       class="comment-user">Sidon</a>
                <span class="comment-date" dir="ltr"><span title="2017-04-30 20:05:42Z, Licen&#231;a: CC BY-SA 3.0" class="relativetime-clean">30/04/17 às 20:05</span></span>
                        <span title="Este coment&#xE1;rio foi editado 1 vez">
                            <svg aria-hidden="true" class="va-text-bottom o50 svg-icon iconPencilSm" width="14" height="14" viewBox="0 0 14 14"><path d="M11.1 1.71l1.13 1.12c.2.2.2.51 0 .71L11.1 4.7 9.21 2.86l1.17-1.15c.2-.2.51-.2.71 0zM2 10.12l6.37-6.43 1.88 1.88L3.88 12H2v-1.88z"/></svg>
                        </span>
            </div>
        </div>
    </li>

            </ul>
	    </div>

        <div id="comments-link-201564" data-rep=50 data-anon=true>
                    <a class="js-add-link comments-link disabled-link" title="Use coment&#xE1;rios para pedir mais informa&#xE7;&#xF5;es ou sugerir melhorias. Evite responder perguntas em coment&#xE1;rios."  href="#" role="button">comentar</a>
                <span class="js-link-separator dno">&nbsp;|&nbsp;</span>
            <a class="js-show-link comments-link dno" title="ver todos os coment&#xE1;rios desta publica&#xE7;&#xE3;o" href=# onclick="" role="button"></a>
        </div>         
    </div>
    </div>
</div>



                <div id="answers">

                    <a name="tab-top"></a>
                    <div id="answers-header">
                        <div class="answers-subheader grid ai-center mb8">
                            <div class="grid--cell fl1">
                                <h2 class="mb0" data-answercount="3">
                                        3 Respostas
                                    <span style="display:none;" itemprop="answerCount">3</span>
                                </h2>
                            </div>
                            <div class="grid--cell">
                                <div class=" grid s-btn-group js-filter-btn">
        <a class="grid--cell s-btn s-btn__muted s-btn__outlined" href="/questions/201564/como-abrir-ficheiros-txt-em-python?answertab=active#tab-top" data-nav-xhref="" title="Respostas com a atividade mais recente primeiro" data-value="active" data-shortcut="A">
            Ativos</a>
        <a class="grid--cell s-btn s-btn__muted s-btn__outlined" href="/questions/201564/como-abrir-ficheiros-txt-em-python?answertab=oldest#tab-top" data-nav-xhref="" title="Respostas na ordem em que foram fornecidas" data-value="oldest" data-shortcut="O">
            Oldest</a>
        <a class="youarehere is-selected grid--cell s-btn s-btn__muted s-btn__outlined" href="/questions/201564/como-abrir-ficheiros-txt-em-python?answertab=votes#tab-top" data-nav-xhref="" title="Respostas com a pontua&#xE7;&#xE3;o mais alta primeiro" data-value="votes" data-shortcut="V">
            Votos</a>
</div>

                            </div>
                        </div>
                    </div>


                                          
<a name="201727"></a>
<div id="answer-201727" class="answer" data-answerid="201727"  itemprop="suggestedAnswer" itemscope itemtype="http://schema.org/Answer">
    <div class="post-layout">
        <div class="votecell post-layout--left">
            <div class="js-voting-container grid fd-column ai-stretch gs4 fc-black-200" data-post-id="201727">
        <button class="js-vote-up-btn grid--cell s-btn s-btn__unset c-pointer" data-controller="s-tooltip" data-s-tooltip-placement="right" title="Upvote this resposta if you find it clear and useful." aria-pressed="false" aria-label="Up vote" data-selected-classes="fc-theme-primary"><svg aria-hidden="true" class="m0 svg-icon iconArrowUpLg" width="36" height="36" viewBox="0 0 36 36"><path d="M2 26h32L18 10 2 26z"/></svg></button>
        <div class="js-vote-count grid--cell fc-black-500 fs-title grid fd-column ai-center" itemprop="upvoteCount" data-value="2">2</div>
        <button class="js-vote-down-btn grid--cell s-btn s-btn__unset c-pointer" data-controller="s-tooltip" data-s-tooltip-placement="right" title="Downvote this resposta if you find it unclear or not useful." aria-pressed="false" aria-label="Down vote" data-selected-classes="fc-theme-primary"><svg aria-hidden="true" class="m0 svg-icon iconArrowDownLg" width="36" height="36" viewBox="0 0 36 36"><path d="M2 10h32L18 26 2 10z"/></svg></button>

    
            <div class="js-accepted-answer-indicator grid--cell fc-green-500 ta-center py4 d-none" data-s-tooltip-placement="right" title="Loading when this answer was accepted&#x2026;" tabindex="0" role="note" aria-label="Aceito">
                <svg aria-hidden="true" class="svg-icon iconCheckmarkLg" width="36" height="36" viewBox="0 0 36 36"><path d="M6 14l8 8L30 6v8L14 30l-8-8v-8z"/></svg>
            </div>

    
        <a class="js-post-issue grid--cell s-btn s-btn__unset c-pointer py6 mx-auto" href="/posts/201727/timeline" data-shortcut="T" data-controller="s-tooltip" data-s-tooltip-placement="right" title="Show activity on this post." aria-label="Linha do tempo"><svg aria-hidden="true" class="mln2 mr0 svg-icon iconHistory" width="19" height="18" viewBox="0 0 19 18"><path d="M3 9a8 8 0 113.73 6.77L8.2 14.3A6 6 0 105 9l3.01-.01-4 4-4-4h3L3 9zm7-4h1.01L11 9.36l3.22 2.1-.6.93L10 10V5z"/></svg></a>

</div>

        </div>

        

<div class="answercell post-layout--right">
    
    <div class="post-text" itemprop="text">
<p>Hugo, esse erro é devido ao Python não localizar o arquivo no local onde você está tentando abrí-lo. Logo, o arquivo não está no mesmo local onde você está executando o script. Por exemplo, se seu script Python estiver na raiz do drive C, o arquivo .txt deverá estar lá também, caso não seja especificado seu caminho.</p>
    </div>
    <div class="grid mb0 fw-wrap ai-start jc-end gs8 gsy">
        <time itemprop="dateCreated" datetime="2017-05-01T20:05:33"></time>
        <div class="grid--cell mr16" style="flex: 1 1 100px;">
            

<div class="post-menu">
    <a href="/a/201727"
       rel="nofollow"
       itemprop="url"
       class="js-share-link js-gps-track"
       title="permalink curto para esta resposta"
       data-gps-track="post.click({ item: 2, priv: 0, post_type: 2 })"
       data-controller="se-share-sheet"
       data-se-share-sheet-title="Compartilhe um link para esta resposta"
       data-se-share-sheet-subtitle=""
       data-se-share-sheet-post-type="answer"
       data-se-share-sheet-social="facebook twitter "
       data-se-share-sheet-location="2"
       data-se-share-sheet-license-url="https%3a%2f%2fcreativecommons.org%2flicenses%2fby-sa%2f3.0%2f"
       data-se-share-sheet-license-name="CC BY-SA 3.0"
       data-s-popover-placement="bottom-start">compartilhar</a>
        <span class="lsep">|</span>
                <a href="/posts/201727/edit" class="suggest-edit-post js-gps-track" data-gps-track="post.click({ item: 6, priv: 0, post_type: 2 })" title="">melhorar esta resposta</a>
        <span class="lsep">|</span>
    <button id="btnFollowPost-201727" class="s-btn s-btn__link fc-black-400 h:fc-black-700 pb2 js-follow-post js-follow-answer js-gps-track" role="button"
            data-gps-track="post.click({ item: 14, priv: 0, post_type: 2 })"
            data-controller="s-tooltip " data-s-tooltip-placement="bottom"
            data-s-popover-placement="bottom" aria-controls=""
            title="Siga esta resposta para receber notifica&#xE7;&#xF5;es">
        seguir
    </button>
        <span class="lsep">|</span>
</div>

        </div>


    <div class="post-signature grid--cell fl0">
        <div class="user-info user-hover">
    <div class="user-action-time">
        respondida <span title="2017-05-01 20:05:33Z" class="relativetime">1/05/17 às 20:05</span>
    </div>
    <div class="user-gravatar32">
        <a href="/users/70784/marcelo-zochio"><div class="gravatar-wrapper-32"><img src="https://www.gravatar.com/avatar/18097abd069877bdc6b110bc42068cce?s=32&amp;d=identicon&amp;r=PG&amp;f=1" alt="" width="32" height="32" class="bar-sm"></div></a>
    </div>
    <div class="user-details" itemprop="author" itemscope itemtype="http://schema.org/Person">
        <a href="/users/70784/marcelo-zochio">Marcelo Zochio</a><span class="d-none" itemprop="name">Marcelo Zochio</span>
        <div class="-flair">
            <span class="reputation-score" title="pontos de reputa&amp;#231;&amp;#227;o " dir="ltr">132</span><span title="7 medalhas de bronze" aria-hidden="true"><span class="badge3"></span><span class="badgecount">7</span></span><span class="v-visible-sr">7 medalhas de bronze</span>
        </div>
    </div>
</div>

    </div>
    </div>
    
</div>


                <div class="post-layout--right">
        <div id="comments-201727" class="comments js-comments-container bt bc-black-2 mt12  dno" data-post-id="201727" data-min-length="15">
            <ul class="comments-list js-comments-list"
                    data-remaining-comments-count="0"
                    data-canpost="false"
                    data-cansee="true"
                    data-comments-unavailable="false"
                    data-addlink-disabled="true">

            </ul>
	    </div>

        <div id="comments-link-201727" data-rep=50 data-anon=true>
                    <a class="js-add-link comments-link disabled-link" title="Use coment&#xE1;rios para pedir mais informa&#xE7;&#xF5;es ou sugerir melhorias. Evite coment&#xE1;rios como &#x201C;&#x2B;1&#x201D; ou &#x201C;obrigado&#x201D;."  href="#" role="button">comentar</a>
                <span class="js-link-separator dno">&nbsp;|&nbsp;</span>
            <a class="js-show-link comments-link dno" title="ver todos os coment&#xE1;rios desta publica&#xE7;&#xE3;o" href=# onclick="" role="button"></a>
        </div>         
    </div>
    </div>
</div>

<div id="dfp-mlb" class="everyonelovesstackoverflow everyoneloves__mid-leaderboard my8 mx-auto"></div>
                                          
<a name="201729"></a>
<div id="answer-201729" class="answer" data-answerid="201729"  itemprop="suggestedAnswer" itemscope itemtype="http://schema.org/Answer">
    <div class="post-layout">
        <div class="votecell post-layout--left">
            <div class="js-voting-container grid fd-column ai-stretch gs4 fc-black-200" data-post-id="201729">
        <button class="js-vote-up-btn grid--cell s-btn s-btn__unset c-pointer" data-controller="s-tooltip" data-s-tooltip-placement="right" title="Upvote this resposta if you find it clear and useful." aria-pressed="false" aria-label="Up vote" data-selected-classes="fc-theme-primary"><svg aria-hidden="true" class="m0 svg-icon iconArrowUpLg" width="36" height="36" viewBox="0 0 36 36"><path d="M2 26h32L18 10 2 26z"/></svg></button>
        <div class="js-vote-count grid--cell fc-black-500 fs-title grid fd-column ai-center" itemprop="upvoteCount" data-value="0">0</div>
        <button class="js-vote-down-btn grid--cell s-btn s-btn__unset c-pointer" data-controller="s-tooltip" data-s-tooltip-placement="right" title="Downvote this resposta if you find it unclear or not useful." aria-pressed="false" aria-label="Down vote" data-selected-classes="fc-theme-primary"><svg aria-hidden="true" class="m0 svg-icon iconArrowDownLg" width="36" height="36" viewBox="0 0 36 36"><path d="M2 10h32L18 26 2 10z"/></svg></button>

    
            <div class="js-accepted-answer-indicator grid--cell fc-green-500 ta-center py4 d-none" data-s-tooltip-placement="right" title="Loading when this answer was accepted&#x2026;" tabindex="0" role="note" aria-label="Aceito">
                <svg aria-hidden="true" class="svg-icon iconCheckmarkLg" width="36" height="36" viewBox="0 0 36 36"><path d="M6 14l8 8L30 6v8L14 30l-8-8v-8z"/></svg>
            </div>

    
        <a class="js-post-issue grid--cell s-btn s-btn__unset c-pointer py6 mx-auto" href="/posts/201729/timeline" data-shortcut="T" data-controller="s-tooltip" data-s-tooltip-placement="right" title="Show activity on this post." aria-label="Linha do tempo"><svg aria-hidden="true" class="mln2 mr0 svg-icon iconHistory" width="19" height="18" viewBox="0 0 19 18"><path d="M3 9a8 8 0 113.73 6.77L8.2 14.3A6 6 0 105 9l3.01-.01-4 4-4-4h3L3 9zm7-4h1.01L11 9.36l3.22 2.1-.6.93L10 10V5z"/></svg></a>

</div>

        </div>

        

<div class="answercell post-layout--right">
    
    <div class="post-text" itemprop="text">
<p>A <em>flag</em> <code>"r"</code> dá erro se o arquivo não existir. </p>

<p>Para evitar o erro, use <code>"a+"</code>:</p>

<pre><code>f = open('ficheiro.txt', "a+")
</code></pre>

<p><a href="https://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files" rel="nofollow noreferrer">Veja mais aqui</a>.</p>
    </div>
    <div class="grid mb0 fw-wrap ai-start jc-end gs8 gsy">
        <time itemprop="dateCreated" datetime="2017-05-01T20:19:06"></time>
        <div class="grid--cell mr16" style="flex: 1 1 100px;">
            

<div class="post-menu">
    <a href="/a/201729"
       rel="nofollow"
       itemprop="url"
       class="js-share-link js-gps-track"
       title="permalink curto para esta resposta"
       data-gps-track="post.click({ item: 2, priv: 0, post_type: 2 })"
       data-controller="se-share-sheet"
       data-se-share-sheet-title="Compartilhe um link para esta resposta"
       data-se-share-sheet-subtitle=""
       data-se-share-sheet-post-type="answer"
       data-se-share-sheet-social="facebook twitter "
       data-se-share-sheet-location="2"
       data-se-share-sheet-license-url="https%3a%2f%2fcreativecommons.org%2flicenses%2fby-sa%2f3.0%2f"
       data-se-share-sheet-license-name="CC BY-SA 3.0"
       data-s-popover-placement="bottom-start">compartilhar</a>
        <span class="lsep">|</span>
                <a href="/posts/201729/edit" class="suggest-edit-post js-gps-track" data-gps-track="post.click({ item: 6, priv: 0, post_type: 2 })" title="">melhorar esta resposta</a>
        <span class="lsep">|</span>
    <button id="btnFollowPost-201729" class="s-btn s-btn__link fc-black-400 h:fc-black-700 pb2 js-follow-post js-follow-answer js-gps-track" role="button"
            data-gps-track="post.click({ item: 14, priv: 0, post_type: 2 })"
            data-controller="s-tooltip " data-s-tooltip-placement="bottom"
            data-s-popover-placement="bottom" aria-controls=""
            title="Siga esta resposta para receber notifica&#xE7;&#xF5;es">
        seguir
    </button>
        <span class="lsep">|</span>
</div>

        </div>


    <div class="post-signature grid--cell fl0">
        <div class="user-info user-hover">
    <div class="user-action-time">
        respondida <span title="2017-05-01 20:19:06Z" class="relativetime">1/05/17 às 20:19</span>
    </div>
    <div class="user-gravatar32">
        <a href="/users/2999/leonel-sanches-da-silva"><div class="gravatar-wrapper-32"><img src="https://i.stack.imgur.com/oWffr.jpg?s=32&amp;g=1" alt="" width="32" height="32" class="bar-sm"></div></a>
    </div>
    <div class="user-details" itemprop="author" itemscope itemtype="http://schema.org/Person">
        <a href="/users/2999/leonel-sanches-da-silva">Leonel Sanches da Silva</a><span class="d-none" itemprop="name">Leonel Sanches da Silva</span>
        <div class="-flair">
            <span class="reputation-score" title="pontos de reputa&amp;#231;&amp;#227;o 87.086" dir="ltr">87,1mil</span><span title="8 medalhas de ouro" aria-hidden="true"><span class="badge1"></span><span class="badgecount">8</span></span><span class="v-visible-sr">8 medalhas de ouro</span><span title="111 medalhas de prata" aria-hidden="true"><span class="badge2"></span><span class="badgecount">111</span></span><span class="v-visible-sr">111 medalhas de prata</span><span title="217 medalhas de bronze" aria-hidden="true"><span class="badge3"></span><span class="badgecount">217</span></span><span class="v-visible-sr">217 medalhas de bronze</span>
        </div>
    </div>
</div>

    </div>
    </div>
    
</div>


                <div class="post-layout--right">
        <div id="comments-201729" class="comments js-comments-container bt bc-black-2 mt12 " data-post-id="201729" data-min-length="15">
            <ul class="comments-list js-comments-list"
                    data-remaining-comments-count="0"
                    data-canpost="false"
                    data-cansee="true"
                    data-comments-unavailable="false"
                    data-addlink-disabled="true">

                        <li id="comment-418668" class="comment js-comment " data-comment-id="418668">
        <div class="js-comment-actions comment-actions">
            <div class="comment-score js-comment-edit-hide">
            </div>
        </div>
        <div class="comment-text js-comment-text-and-form">
            <div class="comment-body js-comment-edit-hide">
                
                <span class="comment-copy">Mas ele quer abrir o arquivo para leitura, se ele n&#227;o achar o arquivo para abrir, mesmo que n&#227;o apresente o erro, ele n&#227;o vai conseguir fazer o que precisa j&#225; que n&#227;o ter&#225; acesso ao conte&#250;do do arquivo.</span>
                
&ndash;&nbsp;<a href="/users/75884/henrique-marti"
                       title="312 reputa&#xE7;&#xE3;o"
                       class="comment-user">Henrique Marti</a>
                <span class="comment-date" dir="ltr"><span title="2017-05-13 13:14:16Z, Licen&#231;a: CC BY-SA 3.0" class="relativetime-clean">13/05/17 às 13:14</span></span>
            </div>
        </div>
    </li>
    <li id="comment-418755" class="comment js-comment " data-comment-id="418755">
        <div class="js-comment-actions comment-actions">
            <div class="comment-score js-comment-edit-hide">
            </div>
        </div>
        <div class="comment-text js-comment-text-and-form">
            <div class="comment-body js-comment-edit-hide">
                
                <span class="comment-copy">A&#237; &#233; quest&#227;o de neg&#243;cio do programador.</span>
                
&ndash;&nbsp;<a href="/users/2999/leonel-sanches-da-silva"
                       title="87.086 reputa&#xE7;&#xE3;o"
                       class="comment-user">Leonel Sanches da Silva</a>
                <span class="comment-date" dir="ltr"><span title="2017-05-13 19:27:53Z, Licen&#231;a: CC BY-SA 3.0" class="relativetime-clean">13/05/17 às 19:27</span></span>
            </div>
        </div>
    </li>
    <li id="comment-418760" class="comment js-comment " data-comment-id="418760">
        <div class="js-comment-actions comment-actions">
            <div class="comment-score js-comment-edit-hide">
            </div>
        </div>
        <div class="comment-text js-comment-text-and-form">
            <div class="comment-body js-comment-edit-hide">
                
                <span class="comment-copy">Cara, somente leitura... O cara s&#243; quer ler o que est&#225; no arquivo, o &#250;nico objetivo em abrir &#233; ler o seu conte&#250;do. Kkk</span>
                
&ndash;&nbsp;<a href="/users/75884/henrique-marti"
                       title="312 reputa&#xE7;&#xE3;o"
                       class="comment-user">Henrique Marti</a>
                <span class="comment-date" dir="ltr"><span title="2017-05-13 19:41:10Z, Licen&#231;a: CC BY-SA 3.0" class="relativetime-clean">13/05/17 às 19:41</span></span>
            </div>
        </div>
    </li>
    <li id="comment-418761" class="comment js-comment " data-comment-id="418761">
        <div class="js-comment-actions comment-actions">
            <div class="comment-score js-comment-edit-hide">
            </div>
        </div>
        <div class="comment-text js-comment-text-and-form">
            <div class="comment-body js-comment-edit-hide">
                
                <span class="comment-copy">U&#233;, se a resposta n&#227;o est&#225; boa, voc&#234; pode responder tamb&#233;m. &#201; melhor que ficar argumentando aqui.</span>
                
&ndash;&nbsp;<a href="/users/2999/leonel-sanches-da-silva"
                       title="87.086 reputa&#xE7;&#xE3;o"
                       class="comment-user">Leonel Sanches da Silva</a>
                <span class="comment-date" dir="ltr"><span title="2017-05-13 19:43:33Z, Licen&#231;a: CC BY-SA 3.0" class="relativetime-clean">13/05/17 às 19:43</span></span>
            </div>
        </div>
    </li>
    <li id="comment-418850" class="comment js-comment " data-comment-id="418850">
        <div class="js-comment-actions comment-actions">
            <div class="comment-score js-comment-edit-hide">
            </div>
        </div>
        <div class="comment-text js-comment-text-and-form">
            <div class="comment-body js-comment-edit-hide">
                
                <span class="comment-copy">J&#225; responderam certo a&#237; encima</span>
                
&ndash;&nbsp;<a href="/users/75884/henrique-marti"
                       title="312 reputa&#xE7;&#xE3;o"
                       class="comment-user">Henrique Marti</a>
                <span class="comment-date" dir="ltr"><span title="2017-05-14 01:25:45Z, Licen&#231;a: CC BY-SA 3.0" class="relativetime-clean">14/05/17 às 1:25</span></span>
            </div>
        </div>
    </li>

            </ul>
	    </div>

        <div id="comments-link-201729" data-rep=50 data-anon=true>
                    <a class="js-add-link comments-link disabled-link" title="Use coment&#xE1;rios para pedir mais informa&#xE7;&#xF5;es ou sugerir melhorias. Evite coment&#xE1;rios como &#x201C;&#x2B;1&#x201D; ou &#x201C;obrigado&#x201D;."  href="#" role="button">comentar</a>
                <span class="js-link-separator dno">&nbsp;|&nbsp;</span>
            <a class="js-show-link comments-link dno" title="ver todos os coment&#xE1;rios desta publica&#xE7;&#xE3;o" href=# onclick="" role="button"></a>
        </div>         
    </div>
    </div>
</div>

                                          
<a name="272739"></a>
<div id="answer-272739" class="answer" data-answerid="272739"  itemprop="suggestedAnswer" itemscope itemtype="http://schema.org/Answer">
    <div class="post-layout">
        <div class="votecell post-layout--left">
            <div class="js-voting-container grid fd-column ai-stretch gs4 fc-black-200" data-post-id="272739">
        <button class="js-vote-up-btn grid--cell s-btn s-btn__unset c-pointer" data-controller="s-tooltip" data-s-tooltip-placement="right" title="Upvote this resposta if you find it clear and useful." aria-pressed="false" aria-label="Up vote" data-selected-classes="fc-theme-primary"><svg aria-hidden="true" class="m0 svg-icon iconArrowUpLg" width="36" height="36" viewBox="0 0 36 36"><path d="M2 26h32L18 10 2 26z"/></svg></button>
        <div class="js-vote-count grid--cell fc-black-500 fs-title grid fd-column ai-center" itemprop="upvoteCount" data-value="0">0</div>
        <button class="js-vote-down-btn grid--cell s-btn s-btn__unset c-pointer" data-controller="s-tooltip" data-s-tooltip-placement="right" title="Downvote this resposta if you find it unclear or not useful." aria-pressed="false" aria-label="Down vote" data-selected-classes="fc-theme-primary"><svg aria-hidden="true" class="m0 svg-icon iconArrowDownLg" width="36" height="36" viewBox="0 0 36 36"><path d="M2 10h32L18 26 2 10z"/></svg></button>

    
            <div class="js-accepted-answer-indicator grid--cell fc-green-500 ta-center py4 d-none" data-s-tooltip-placement="right" title="Loading when this answer was accepted&#x2026;" tabindex="0" role="note" aria-label="Aceito">
                <svg aria-hidden="true" class="svg-icon iconCheckmarkLg" width="36" height="36" viewBox="0 0 36 36"><path d="M6 14l8 8L30 6v8L14 30l-8-8v-8z"/></svg>
            </div>

    
        <a class="js-post-issue grid--cell s-btn s-btn__unset c-pointer py6 mx-auto" href="/posts/272739/timeline" data-shortcut="T" data-controller="s-tooltip" data-s-tooltip-placement="right" title="Show activity on this post." aria-label="Linha do tempo"><svg aria-hidden="true" class="mln2 mr0 svg-icon iconHistory" width="19" height="18" viewBox="0 0 19 18"><path d="M3 9a8 8 0 113.73 6.77L8.2 14.3A6 6 0 105 9l3.01-.01-4 4-4-4h3L3 9zm7-4h1.01L11 9.36l3.22 2.1-.6.93L10 10V5z"/></svg></a>

</div>

        </div>

        

<div class="answercell post-layout--right">
    
    <div class="post-text" itemprop="text">
<p>consigo abrir o arquivo de qualquer lugar e mostra-lo na tela desta forma:</p>

<pre><code>f=open("C:\Users\usuario\Downloads\Telefones.txt",'r') #caminho do arquivo
file_data = f.read() #variavel que receberá o arquivo escolhido
print file_data
</code></pre>
    </div>
    <div class="grid mb0 fw-wrap ai-start jc-end gs8 gsy">
        <time itemprop="dateCreated" datetime="2018-01-29T22:58:50"></time>
        <div class="grid--cell mr16" style="flex: 1 1 100px;">
            

<div class="post-menu">
    <a href="/a/272739"
       rel="nofollow"
       itemprop="url"
       class="js-share-link js-gps-track"
       title="permalink curto para esta resposta"
       data-gps-track="post.click({ item: 2, priv: 0, post_type: 2 })"
       data-controller="se-share-sheet"
       data-se-share-sheet-title="Compartilhe um link para esta resposta"
       data-se-share-sheet-subtitle=""
       data-se-share-sheet-post-type="answer"
       data-se-share-sheet-social="facebook twitter "
       data-se-share-sheet-location="2"
       data-se-share-sheet-license-url="https%3a%2f%2fcreativecommons.org%2flicenses%2fby-sa%2f3.0%2f"
       data-se-share-sheet-license-name="CC BY-SA 3.0"
       data-s-popover-placement="bottom-start">compartilhar</a>
        <span class="lsep">|</span>
                <a href="/posts/272739/edit" class="suggest-edit-post js-gps-track" data-gps-track="post.click({ item: 6, priv: 0, post_type: 2 })" title="">melhorar esta resposta</a>
        <span class="lsep">|</span>
    <button id="btnFollowPost-272739" class="s-btn s-btn__link fc-black-400 h:fc-black-700 pb2 js-follow-post js-follow-answer js-gps-track" role="button"
            data-gps-track="post.click({ item: 14, priv: 0, post_type: 2 })"
            data-controller="s-tooltip " data-s-tooltip-placement="bottom"
            data-s-popover-placement="bottom" aria-controls=""
            title="Siga esta resposta para receber notifica&#xE7;&#xF5;es">
        seguir
    </button>
        <span class="lsep">|</span>
</div>

        </div>
    <div class="post-signature grid--cell fl0">
<div class="user-info ">
    <div class="user-action-time">
        <a href="/posts/272739/revisions" title="mostrar todas as edições desta publicação"
                         class="js-gps-track"
                         data-gps-track="post.click({ item: 4, priv: 0, post_type: 2 })">editada <span title="2018-01-30 01:06:18Z" class="relativetime">30/01/18 às 1:06</span></a>
    </div>
    <div class="user-gravatar32">
        <a href="/users/4927/roberto-de-campos"><div class="gravatar-wrapper-32"><img src="https://graph.facebook.com/100000396230686/picture?type=large" alt="" width="32" height="32" class="bar-sm"></div></a>
    </div>
    <div class="user-details">
        <a href="/users/4927/roberto-de-campos">Roberto de Campos</a>
        <div class="-flair">
            <span class="reputation-score" title="pontos de reputa&amp;#231;&amp;#227;o " dir="ltr">5.232</span><span title="1 medalhas de ouro" aria-hidden="true"><span class="badge1"></span><span class="badgecount">1</span></span><span class="v-visible-sr">1 medalhas de ouro</span><span title="17 medalhas de prata" aria-hidden="true"><span class="badge2"></span><span class="badgecount">17</span></span><span class="v-visible-sr">17 medalhas de prata</span><span title="28 medalhas de bronze" aria-hidden="true"><span class="badge3"></span><span class="badgecount">28</span></span><span class="v-visible-sr">28 medalhas de bronze</span>
        </div>
    </div>
</div>    </div>


    <div class="post-signature grid--cell fl0">
        <div class="user-info ">
    <div class="user-action-time">
        respondida <span title="2018-01-29 22:58:50Z" class="relativetime">29/01/18 às 22:58</span>
    </div>
    <div class="user-gravatar32">
        <a href="/users/103405/renato-kamiya"><div class="gravatar-wrapper-32"><img src="https://graph.facebook.com/1857675827599315/picture?type=large" alt="" width="32" height="32" class="bar-sm"></div></a>
    </div>
    <div class="user-details" itemprop="author" itemscope itemtype="http://schema.org/Person">
        <a href="/users/103405/renato-kamiya">Renato Kamiya</a><span class="d-none" itemprop="name">Renato Kamiya</span>
        <div class="-flair">
            <span class="reputation-score" title="pontos de reputa&amp;#231;&amp;#227;o " dir="ltr">1</span>
        </div>
    </div>
</div>

    </div>
    </div>
    
</div>


                <div class="post-layout--right">
        <div id="comments-272739" class="comments js-comments-container bt bc-black-2 mt12  dno" data-post-id="272739" data-min-length="15">
            <ul class="comments-list js-comments-list"
                    data-remaining-comments-count="0"
                    data-canpost="false"
                    data-cansee="true"
                    data-comments-unavailable="false"
                    data-addlink-disabled="true">

            </ul>
	    </div>

        <div id="comments-link-272739" data-rep=50 data-anon=true>
                    <a class="js-add-link comments-link disabled-link" title="Use coment&#xE1;rios para pedir mais informa&#xE7;&#xF5;es ou sugerir melhorias. Evite coment&#xE1;rios como &#x201C;&#x2B;1&#x201D; ou &#x201C;obrigado&#x201D;."  href="#" role="button">comentar</a>
                <span class="js-link-separator dno">&nbsp;|&nbsp;</span>
            <a class="js-show-link comments-link dno" title="ver todos os coment&#xE1;rios desta publica&#xE7;&#xE3;o" href=# onclick="" role="button"></a>
        </div>         
    </div>
    </div>
</div>


                        <a name='new-answer'></a>
                            <form id="post-form" action="/questions/201564/answer/submit" method="post" class="js-add-answer-component post-form">
                                <input type="hidden" id="post-id" value="201564" />
                                <input type="hidden" id="qualityBanWarningShown" name="qualityBanWarningShown" value="false" />
                                <input type="hidden" name="referrer" value="" />
                                <h2 class="space">
                                    Sua resposta
                                </h2>
                                    

    <script>
        StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
                StackExchange.using("snippets", function () {
                    StackExchange.snippets.init();
                });
            });
        }, "code-snippets");
    </script>


<script>
    StackExchange.ready(function() {
        var channelOptions = {
            tags: "".split(" "),
            id: "526"
        };
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
                StackExchange.using("snippets", function() {
                    createEditor();
                });
            }
            else {
                createEditor();
            }
        });

        function createEditor() {
            StackExchange.prepareEditor({
                heartbeatType: 'answer',
                autoActivateHeartbeat: false,
                convertImagesToLinks: false,
                noModals: true,
                showLowRepImageUploadWarning: true,
                reputationToPostImages: null,
                bindNavPrevention: true,
                postfix: "",
                imageUploader: {
                brandingHtml: "Desenvolvido por \u003ca href=\"https://imgur.com/\"\u003e\u003csvg class=\"svg-icon\" width=\"50\" height=\"18\" viewBox=\"0 0 50 18\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"\u003e\u003cpath d=\"M46.1709 9.17788C46.1709 8.26454 46.2665 7.94324 47.1084 7.58816C47.4091 7.46349 47.7169 7.36433 48.0099 7.26993C48.9099 6.97997 49.672 6.73443 49.672 5.93063C49.672 5.22043 48.9832 4.61182 48.1414 4.61182C47.4335 4.61182 46.7256 4.91628 46.0943 5.50789C45.7307 4.9328 45.2525 4.66231 44.6595 4.66231C43.6264 4.66231 43.1481 5.28821 43.1481 6.59048V11.9512C43.1481 13.2535 43.6264 13.8962 44.6595 13.8962C45.6924 13.8962 46.1709 13.2535 46.1709 11.9512V9.17788Z\"/\u003e\u003cpath d=\"M32.492 10.1419C32.492 12.6954 34.1182 14.0484 37.0451 14.0484C39.9723 14.0484 41.5985 12.6954 41.5985 10.1419V6.59049C41.5985 5.28821 41.1394 4.66232 40.1061 4.66232C39.0732 4.66232 38.5948 5.28821 38.5948 6.59049V9.60062C38.5948 10.8521 38.2696 11.5455 37.0451 11.5455C35.8209 11.5455 35.4954 10.8521 35.4954 9.60062V6.59049C35.4954 5.28821 35.0173 4.66232 34.0034 4.66232C32.9703 4.66232 32.492 5.28821 32.492 6.59049V10.1419Z\" /\u003e\u003cpath fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M25.6622 17.6335C27.8049 17.6335 29.3739 16.9402 30.2537 15.6379C30.8468 14.7755 30.9615 13.5579 30.9615 11.9512V6.59049C30.9615 5.28821 30.4833 4.66231 29.4502 4.66231C28.9913 4.66231 28.4555 4.94978 28.1109 5.50789C27.499 4.86533 26.7335 4.56087 25.7005 4.56087C23.1369 4.56087 21.0134 6.57349 21.0134 9.27932C21.0134 11.9852 23.003 13.913 25.3754 13.913C26.5612 13.913 27.4607 13.4902 28.1109 12.6616C28.1109 12.7229 28.1161 12.7799 28.121 12.8346C28.1256 12.8854 28.1301 12.9342 28.1301 12.983C28.1301 14.4373 27.2502 15.2321 25.777 15.2321C24.8349 15.2321 24.1352 14.9821 23.5661 14.7787C23.176 14.6393 22.8472 14.5218 22.5437 14.5218C21.7977 14.5218 21.2429 15.0123 21.2429 15.6887C21.2429 16.7375 22.9072 17.6335 25.6622 17.6335ZM24.1317 9.27932C24.1317 7.94324 24.9928 7.09766 26.1024 7.09766C27.2119 7.09766 28.0918 7.94324 28.0918 9.27932C28.0918 10.6321 27.2311 11.5116 26.1024 11.5116C24.9737 11.5116 24.1317 10.6491 24.1317 9.27932Z\"/\u003e\u003cpath d=\"M16.8045 11.9512C16.8045 13.2535 17.2637 13.8962 18.2965 13.8962C19.3298 13.8962 19.8079 13.2535 19.8079 11.9512V8.12928C19.8079 5.82936 18.4879 4.62866 16.4027 4.62866C15.1594 4.62866 14.279 4.98375 13.3609 5.88013C12.653 5.05154 11.6581 4.62866 10.3573 4.62866C9.34336 4.62866 8.57809 4.89931 7.9466 5.5079C7.58314 4.9328 7.10506 4.66232 6.51203 4.66232C5.47873 4.66232 5.00066 5.28821 5.00066 6.59049V11.9512C5.00066 13.2535 5.47873 13.8962 6.51203 13.8962C7.54479 13.8962 8.0232 13.2535 8.0232 11.9512V8.90741C8.0232 7.58817 8.44431 6.91179 9.53458 6.91179C10.5104 6.91179 10.893 7.58817 10.893 8.94108V11.9512C10.893 13.2535 11.3711 13.8962 12.4044 13.8962C13.4375 13.8962 13.9157 13.2535 13.9157 11.9512V8.90741C13.9157 7.58817 14.3365 6.91179 15.4269 6.91179C16.4027 6.91179 16.8045 7.58817 16.8045 8.94108V11.9512Z\"/\u003e\u003cpath d=\"M3.31675 6.59049C3.31675 5.28821 2.83866 4.66232 1.82471 4.66232C0.791758 4.66232 0.313354 5.28821 0.313354 6.59049V11.9512C0.313354 13.2535 0.791758 13.8962 1.82471 13.8962C2.85798 13.8962 3.31675 13.2535 3.31675 11.9512V6.59049Z\" /\u003e\u003cpath d=\"M1.87209 0.400291C0.843612 0.400291 0 1.1159 0 1.98861C0 2.87869 0.822846 3.57676 1.87209 3.57676C2.90056 3.57676 3.7234 2.87869 3.7234 1.98861C3.7234 1.1159 2.90056 0.400291 1.87209 0.400291Z\" fill=\"#1BB76E\"/\u003e\u003c/svg\u003e\u003c/a\u003e",
                    contentPolicyHtml: "User contributions licensed under \u003ca href=\"https://stackoverflow.com/help/licensing\"\u003ecc by-sa\u003c/a\u003e \u003ca href=\"https://stackoverflow.com/legal/content-policy\"\u003e(content policy)\u003c/a\u003e",
                    allowUrls: true
                },
                onDemand: true,
                discardSelector: ".discard-answer"
                ,immediatelyShowMarkdownHelp:true
            });
                    }
    });
</script>
<div id="post-editor" class="post-editor js-post-editor">

    <div class="ps-relative">
        <div class="wmd-container mb8">
            <div id="wmd-button-bar" class="wmd-button-bar btr-sm"></div>
            <div class="js-stacks-validation">
                <div class="ps-relative">
                    <textarea id="wmd-input"
                              name="post-text"
                              class="wmd-input s-input bar0 js-post-body-field"
                              data-post-type-id="2"
                              cols="92" rows="15"
                              tabindex="101"
                              data-min-length=""></textarea>
                </div>
                <div class="s-input-message mt4 d-none js-stacks-validation-message"></div>
            </div>
        </div>
    </div>

    <aside class="grid ai-start jc-space-between js-answer-help s-notice s-notice__warning pb0 pr4 pt4 mb8 d-none" role="status" aria-hidden="true">
    <div class="grid--cell pt8">
        <p>Obrigado por contribuir com o Stack Overflow em Português!</p><ul><li>Certifique-se de <em>responder à pergunta</em>. Entre em detalhes sobre a sua solução e compartilhe o que você descobriu.</li></ul><p>Mas <em>evite</em> …</p><ul><li>Pedir esclarecimentos ou detalhes sobre outras respostas.</li><li>Fazer afirmações baseadas apenas na sua opinião; aponte referências ou experiências anteriores.</li></ul><p>Para aprender mais, veja nossas <a href="http://br.stackoverflow.com/questions/how-to-answer">dicas sobre como escrever boas respostas</a>.</p>
    </div>
    <button class="grid--cell js-answer-help-close-btn s-btn s-btn__muted fc-dark">
        <svg aria-hidden="true" class="svg-icon iconClear" width="18" height="18" viewBox="0 0 18 18"><path d="M15 4.41L13.59 3 9 7.59 4.41 3 3 4.41 7.59 9 3 13.59 4.41 15 9 10.41 13.59 15 15 13.59 10.41 9 15 4.41z"/></svg>
    </button>
</aside>


    <div id="draft-saved" class="fc-success float-left h24" style="display:none;">Rascunho salvo</div>
    <div id="draft-discarded" class="fc-error float-left h24" style="display:none;">Rascunho descartado</div>



        <div id="wmd-preview" class="wmd-preview" ></div>
        <div></div>
        <div class="edit-block">
            <input id="fkey" name="fkey" type="hidden" value="f4b78665943d49f72333c3d80d4c7823069e60242e13087f67ce62e267f9013f">
            <input id="author" name="author" type="text">
        </div>

</div>


                                <div class="ps-relative">
                                                <div class="form-item dno new-post-login p0 my16">
                <div class="grid gs16 md:fd-column new-login-form">
                    <div class="grid fd-column w50 md:w-auto gsy gs8 jc-space-between new-login-left">
                        <h3 class="grid--cell fs-title">Registre-se ou fa&#231;a <a id="login-link" href="/users/login?ssrc=question_page&returnurl=https%3a%2f%2fpt.stackoverflow.com%2fquestions%2f201564%2fcomo-abrir-ficheiros-txt-em-python%23new-answer">log-in</a></h3>
                        <script>
                            StackExchange.ready(function () {
                                StackExchange.helpers.onClickDraftSave('#login-link');
                            });
                        </script>
                        <div class="grid--cell s-btn s-btn__muted s-btn__outlined s-btn__icon google-login" data-ga="[&quot;sign up&quot;,&quot;Sign Up Started - Google&quot;,&quot;New Post&quot;,null,null]">
                            <svg aria-hidden="true" class="native svg-icon iconGoogle" width="18" height="18" viewBox="0 0 18 18"><path d="M16.51 8H8.98v3h4.3c-.18 1-.74 1.48-1.6 2.04v2.01h2.6a7.8 7.8 0 002.38-5.88c0-.57-.05-.66-.15-1.18z" fill="#4285F4"/><path d="M8.98 17c2.16 0 3.97-.72 5.3-1.94l-2.6-2a4.8 4.8 0 01-7.18-2.54H1.83v2.07A8 8 0 008.98 17z" fill="#34A853"/><path d="M4.5 10.52a4.8 4.8 0 010-3.04V5.41H1.83a8 8 0 000 7.18l2.67-2.07z" fill="#FBBC05"/><path d="M8.98 4.18c1.17 0 2.23.4 3.06 1.2l2.3-2.3A8 8 0 001.83 5.4L4.5 7.49a4.77 4.77 0 014.48-3.3z" fill="#EA4335"/></svg> Registre-se usando o Google
                        </div>
                        <div class="grid--cell s-btn s-btn__muted s-btn__icon facebook-login" data-ga="[&quot;sign up&quot;,&quot;Sign Up Started - Facebook&quot;,&quot;New Post&quot;,null,null]">
                            <svg aria-hidden="true" class="svg-icon iconFacebook" width="18" height="18" viewBox="0 0 18 18"><path d="M3 1a2 2 0 00-2 2v12c0 1.1.9 2 2 2h12a2 2 0 002-2V3a2 2 0 00-2-2H3zm6.55 16v-6.2H7.46V8.4h2.09V6.61c0-2.07 1.26-3.2 3.1-3.2.88 0 1.64.07 1.87.1v2.16h-1.29c-1 0-1.19.48-1.19 1.18V8.4h2.39l-.31 2.42h-2.08V17h-2.5z" fill="#4167B2"/></svg> Registre-se usando o Facebook
                        </div>
                        <div class="grid--cell s-btn s-btn__muted s-btn__outlined s-btn__icon stackexchange-login" data-ga="[&quot;sign up&quot;,&quot;Sign Up Navigation&quot;,&quot;New Post&quot;,null,null]">
                            <svg aria-hidden="true" class="native svg-icon iconLogoGlyphXSm" width="18" height="18" viewBox="0 0 18 18"><path d="M14 16v-5h2v7H2v-7h2v5h10z" fill="#BCBBBB"/><path d="M12.09.72l-1.21.9 4.5 6.07 1.22-.9L12.09.71zM5 15h8v-2H5v2zm9.15-5.87L8.35 4.3l.96-1.16 5.8 4.83-.96 1.16zm-7.7-1.47l6.85 3.19.63-1.37-6.85-3.2-.63 1.38zm6.53 5L5.4 11.39l.38-1.67 7.42 1.48-.22 1.46z" fill="#F48024"/></svg> Registre-se usando Email e Senha
                        </div>
                    </div>
                    <input type="hidden" name="use-facebook" class="use-facebook" value="false" />
                    <input type="hidden" name="use-google" class="use-google" value="false" />
                    <button type="button" class="d-none js-submit-openid">Submit</button>
                    <div class="grid gsy gs8 fd-column w50 md:w-auto new-login-right form-item p0">
                                <h3 class="grid--cell fs-title">Publicar como convidado</h3>
            <div class="grid--cell">
                <div class="grid gs4 gsy fd-column">
                    <label class="s-label" for="display-name">Nome</label>
                    <div class="grid ps-relative">
                        <input class="s-input" id="display-name" name="display-name" maxlength="30" type="text" value="" tabindex="105" placeholder="" />
                    </div>
                </div>
            </div>
            <div class="grid--cell">
                <div class="grid gs4 gsy fd-column">
                    <div class="grid--cell">
                        <div class="grid gs2 gsy fd-column">
                            <label class="grid--cell s-label" for="m-address">E-mail</label>
                            <p class="grid--cell s-description">Required, but never shown</p>
                        </div>
                    </div>
                    <div class="grid ps-relative">
                        <input class="s-input js-post-email-field" id="m-address" name="m-address" type="text" value="" size="40" tabindex="106" placeholder="" />
                    </div>
                </div>
            </div>

                    </div>
                </div>
            </div>
            <script>
                StackExchange.ready(
                    function () {
                        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fpt.stackoverflow.com%2fquestions%2f201564%2fcomo-abrir-ficheiros-txt-em-python%23new-answer', 'question_page');
                    }
                );
            </script>
            <noscript>
                        <h3 class="grid--cell fs-title">Publicar como convidado</h3>
            <div class="grid--cell">
                <div class="grid gs4 gsy fd-column">
                    <label class="s-label" for="display-name">Nome</label>
                    <div class="grid ps-relative">
                        <input class="s-input" id="display-name" name="display-name" maxlength="30" type="text" value="" tabindex="105" placeholder="" />
                    </div>
                </div>
            </div>
            <div class="grid--cell">
                <div class="grid gs4 gsy fd-column">
                    <div class="grid--cell">
                        <div class="grid gs2 gsy fd-column">
                            <label class="grid--cell s-label" for="m-address">E-mail</label>
                            <p class="grid--cell s-description">Required, but never shown</p>
                        </div>
                    </div>
                    <div class="grid ps-relative">
                        <input class="s-input js-post-email-field" id="m-address" name="m-address" type="text" value="" size="40" tabindex="106" placeholder="" />
                    </div>
                </div>
            </div>

            </noscript>

                                </div>

                                    <div class="form-submit cbt grid gsx gs4">
                                        <button id="submit-button" class="grid--cell s-btn s-btn__primary s-btn__icon" type="submit" tabindex="120" autocomplete="off">
Publique sua resposta                                        </button>
                                        <button class="grid--cell s-btn s-btn__danger discard-answer dno">
                                            Descartar
                                        </button>
                                            <p class="privacy-policy-agreement">
                                                Ao clicar em “Publique sua resposta”, voc&#234; concorda com os <a href='https://stackoverflow.com/legal/terms-of-service/public' name='tos' target='_blank' class='-link'>termos de servi&#231;o</a>, <a href='https://stackoverflow.com/legal/privacy-policy' name='privacy' target='_blank' class='-link'>pol&#237;tica de privacidade</a> e <a href='https://stackoverflow.com/legal/cookie-policy' name='cookie' target='_blank' class='-link'>pol&#237;tica de Cookies</a><input type="hidden" name="legalLinksShown" value="1" />
                                            </p>
                                    </div>
                                    <div class="js-general-error general-error cbt d-none"></div>
                            </form>



                            <h2 class="bottom-notice" data-loc="1">
Esta n&#xE3;o &#xE9; a resposta que voc&#xEA; est&#xE1; procurando? Pesquise outras perguntas com a tag <a href="/questions/tagged/python" class="post-tag" title="mostrar perguntas com a tag &#39;python&#39;" rel="tag">python</a>  ou <a href="/questions/ask">fa&#231;a sua pr&#243;pria pergunta</a>.                            </h2>
                </div>
            </div>
            <div id="sidebar" class="show-votes" role="complementary" aria-label="barra lateral">
                
<div class="s-sidebarwidget s-sidebarwidget__yellow s-anchors s-anchors__grayscale mb16" data-tracker="cb=1">
                <div class="s-sidebarwidget--header s-sidebarwidget__small-bold-text fc-light d:fc-black-900">
                    Em destaque no Meta
                </div>
            <ul class="s-sidebarwidget--content s-sidebarwidget__items pt0 pr16 pb0 pl16">
    <li class="s-sidebarwidget--item grid">
        <div class="grid--cell1 fl-shrink0">
                <a href="https://meta.stackexchange.com/questions/348746/were-switching-to-commonmark" data-ga="[&quot;community bulletin board&quot;,&quot;Em destaque no Meta&quot;,&quot;https://meta.stackexchange.com/questions/348746/were-switching-to-commonmark&quot;,null,null]">
<div class="favicon favicon-stackexchangemeta" title="Meta Stack Exchange"></div>                </a>
        </div>
        <div class="grid--cell">
            <a href="https://meta.stackexchange.com/questions/348746/were-switching-to-commonmark" class="js-gps-track" data-ga="[&quot;community bulletin board&quot;,&quot;Em destaque no Meta&quot;,&quot;https://meta.stackexchange.com/questions/348746/were-switching-to-commonmark&quot;,null,null]" data-gps-track="communitybulletin.click({ priority: 3, position: 0 })">We&#39;re switching to CommonMark</a>
        </div>
    </li>
            </ul>
            <ul class="s-sidebarwidget--content s-sidebarwidget__items pt0 pr16 pb0 pl16">
    <li class="s-sidebarwidget--item grid">
        <div class="grid--cell1 fl-shrink0">
                <a href="https://meta.stackexchange.com/questions/349276/new-post-lock-available-on-meta-sites-policy-lock" data-ga="[&quot;community bulletin board&quot;,&quot;Em destaque no Meta&quot;,&quot;https://meta.stackexchange.com/questions/349276/new-post-lock-available-on-meta-sites-policy-lock&quot;,null,null]">
<div class="favicon favicon-stackexchangemeta" title="Meta Stack Exchange"></div>                </a>
        </div>
        <div class="grid--cell">
            <a href="https://meta.stackexchange.com/questions/349276/new-post-lock-available-on-meta-sites-policy-lock" class="js-gps-track" data-ga="[&quot;community bulletin board&quot;,&quot;Em destaque no Meta&quot;,&quot;https://meta.stackexchange.com/questions/349276/new-post-lock-available-on-meta-sites-policy-lock&quot;,null,null]" data-gps-track="communitybulletin.click({ priority: 3, position: 1 })">New post lock available on meta sites: Policy Lock</a>
        </div>
    </li>
            </ul>
            <ul class="s-sidebarwidget--content s-sidebarwidget__items pt0 pr16 pb0 pl16">
    <li class="s-sidebarwidget--item grid">
        <div class="grid--cell1 fl-shrink0">
                <a href="https://pt.meta.stackoverflow.com/questions/1160/o-problema-dos-vampiros-de-ajuda" data-ga="[&quot;community bulletin board&quot;,&quot;Em destaque no Meta&quot;,&quot;https://pt.meta.stackoverflow.com/questions/1160/o-problema-dos-vampiros-de-ajuda&quot;,null,null]">
<div class="favicon favicon-brmeta" title="Stack Overflow em Português Meta"></div>                </a>
        </div>
        <div class="grid--cell">
            <a href="https://pt.meta.stackoverflow.com/questions/1160/o-problema-dos-vampiros-de-ajuda" class="js-gps-track" data-ga="[&quot;community bulletin board&quot;,&quot;Em destaque no Meta&quot;,&quot;https://pt.meta.stackoverflow.com/questions/1160/o-problema-dos-vampiros-de-ajuda&quot;,null,null]" data-gps-track="communitybulletin.click({ priority: 6, position: 2 })">O problema dos Vampiros de Ajuda</a>
        </div>
    </li>
            </ul>
            <ul class="s-sidebarwidget--content s-sidebarwidget__items pt0 pr16 pb0 pl16">
    <li class="s-sidebarwidget--item grid">
        <div class="grid--cell1 fl-shrink0">
                <a href="https://pt.meta.stackoverflow.com/questions/2632/vote-hoje-vote-amanh%c3%a3-vote-sempre-vote-consciente" data-ga="[&quot;community bulletin board&quot;,&quot;Em destaque no Meta&quot;,&quot;https://pt.meta.stackoverflow.com/questions/2632/vote-hoje-vote-amanh%c3%a3-vote-sempre-vote-consciente&quot;,null,null]">
<div class="favicon favicon-brmeta" title="Stack Overflow em Português Meta"></div>                </a>
        </div>
        <div class="grid--cell">
            <a href="https://pt.meta.stackoverflow.com/questions/2632/vote-hoje-vote-amanh%c3%a3-vote-sempre-vote-consciente" class="js-gps-track" data-ga="[&quot;community bulletin board&quot;,&quot;Em destaque no Meta&quot;,&quot;https://pt.meta.stackoverflow.com/questions/2632/vote-hoje-vote-amanh%c3%a3-vote-sempre-vote-consciente&quot;,null,null]" data-gps-track="communitybulletin.click({ priority: 6, position: 3 })">Vote hoje! Vote amanh&#227;! Vote sempre! Vote consciente!</a>
        </div>
    </li>
            </ul>
            <ul class="s-sidebarwidget--content s-sidebarwidget__items pt0 pr16 pb0 pl16">
    <li class="s-sidebarwidget--item grid">
        <div class="grid--cell1 fl-shrink0">
                <a href="https://pt.meta.stackoverflow.com/questions/8338/community-ads-2020" data-ga="[&quot;community bulletin board&quot;,&quot;Em destaque no Meta&quot;,&quot;https://pt.meta.stackoverflow.com/questions/8338/community-ads-2020&quot;,null,null]">
<div class="favicon favicon-brmeta" title="Stack Overflow em Português Meta"></div>                </a>
        </div>
        <div class="grid--cell">
            <a href="https://pt.meta.stackoverflow.com/questions/8338/community-ads-2020" class="js-gps-track" data-ga="[&quot;community bulletin board&quot;,&quot;Em destaque no Meta&quot;,&quot;https://pt.meta.stackoverflow.com/questions/8338/community-ads-2020&quot;,null,null]" data-gps-track="communitybulletin.click({ priority: 6, position: 4 })">Community Ads 2020</a>
        </div>
    </li>
            </ul>
            <ul class="s-sidebarwidget--content s-sidebarwidget__items pt0 pr16 pb0 pl16">
    <li class="s-sidebarwidget--item grid">
        <div class="grid--cell1 fl-shrink0">
                <a href="https://pt.meta.stackoverflow.com/questions/8349/como-moderar-o-sopt" data-ga="[&quot;community bulletin board&quot;,&quot;Em destaque no Meta&quot;,&quot;https://pt.meta.stackoverflow.com/questions/8349/como-moderar-o-sopt&quot;,null,null]">
<div class="favicon favicon-brmeta" title="Stack Overflow em Português Meta"></div>                </a>
        </div>
        <div class="grid--cell">
            <a href="https://pt.meta.stackoverflow.com/questions/8349/como-moderar-o-sopt" class="js-gps-track" data-ga="[&quot;community bulletin board&quot;,&quot;Em destaque no Meta&quot;,&quot;https://pt.meta.stackoverflow.com/questions/8349/como-moderar-o-sopt&quot;,null,null]" data-gps-track="communitybulletin.click({ priority: 6, position: 5 })">Como moderar o SOpt?</a>
        </div>
    </li>
            </ul>
            <ul class="s-sidebarwidget--content s-sidebarwidget__items pt0 pr16 pb0 pl16">
    <li class="s-sidebarwidget--item grid">
        <div class="grid--cell1 fl-shrink0">
                <a href="https://pt.meta.stackoverflow.com/questions/8353/vamos-partilhar-as-regras-da-comunidade-com-os-novos-usu%c3%a1rios" data-ga="[&quot;community bulletin board&quot;,&quot;Em destaque no Meta&quot;,&quot;https://pt.meta.stackoverflow.com/questions/8353/vamos-partilhar-as-regras-da-comunidade-com-os-novos-usu%c3%a1rios&quot;,null,null]">
<div class="favicon favicon-brmeta" title="Stack Overflow em Português Meta"></div>                </a>
        </div>
        <div class="grid--cell">
            <a href="https://pt.meta.stackoverflow.com/questions/8353/vamos-partilhar-as-regras-da-comunidade-com-os-novos-usu%c3%a1rios" class="js-gps-track" data-ga="[&quot;community bulletin board&quot;,&quot;Em destaque no Meta&quot;,&quot;https://pt.meta.stackoverflow.com/questions/8353/vamos-partilhar-as-regras-da-comunidade-com-os-novos-usu%c3%a1rios&quot;,null,null]" data-gps-track="communitybulletin.click({ priority: 6, position: 6 })">Vamos partilhar as regras da comunidade com os novos usu&#225;rios</a>
        </div>
    </li>
            </ul>
</div>


<div id="dfp-tsb" class="everyonelovesstackoverflow everyoneloves__top-sidebar mb8"></div>

                
                

                    <div class="module sidebar-related">
                        <h4 id="h-related">Relacionado</h4>
                        <div class="related js-gps-related-questions" data-tracker="rq=1">
                            <div class="spacer"><a href="/q/170625" title="Contagem de votos (a favor - contra)"><div class="answer-votes default">4</div></a><a href="/questions/170625/abrir-arquivo-texto-em-pacote-python" class="question-hyperlink">Abrir arquivo texto em pacote Python</a></div><div class="spacer"><a href="/q/185511" title="Contagem de votos (a favor - contra)"><div class="answer-votes default">2</div></a><a href="/questions/185511/python-interpolate-txt" class="question-hyperlink">Python Interpolate Txt</a></div><div class="spacer"><a href="/q/273170" title="Contagem de votos (a favor - contra)"><div class="answer-votes answered-accepted default">1</div></a><a href="/questions/273170/requisi%c3%a7%c3%a3o-get-em-python-encerra-o-programa-quando-n%c3%a3o-h%c3%a1-conex%c3%a3o" class="question-hyperlink">Requisi&#231;&#227;o Get em Python encerra o programa quando n&#227;o h&#225; conex&#227;o</a></div><div class="spacer"><a href="/q/300645" title="Contagem de votos (a favor - contra)"><div class="answer-votes default">0</div></a><a href="/questions/300645/executar-terminal-a-partir-de-programa-python" class="question-hyperlink">Executar terminal a partir de programa Python</a></div><div class="spacer"><a href="/q/317335" title="Contagem de votos (a favor - contra)"><div class="answer-votes default">0</div></a><a href="/questions/317335/como-executar-um-script-python-que-est%c3%a1-localizado-em-outra-m%c3%a1quina" class="question-hyperlink">Como executar um script python que est&#225; localizado em outra m&#225;quina</a></div><div class="spacer"><a href="/q/355865" title="Contagem de votos (a favor - contra)"><div class="answer-votes answered-accepted default">2</div></a><a href="/questions/355865/instanciar-classe-passando-apenas-alguns-par%c3%a2metros-em-python-3" class="question-hyperlink">Instanciar classe passando apenas alguns par&#226;metros em Python 3</a></div><div class="spacer"><a href="/q/371871" title="Contagem de votos (a favor - contra)"><div class="answer-votes default">3</div></a><a href="/questions/371871/como-escrever-um-arquivo-init-em-python-3" class="question-hyperlink">Como escrever um arquivo __init__ em Python 3?</a></div><div class="spacer"><a href="/q/397226" title="Contagem de votos (a favor - contra)"><div class="answer-votes answered-accepted default">0</div></a><a href="/questions/397226/verifica%c3%a7%c3%a3o-de-extens%c3%a3o-do-arquivo-e-mudar-o-seu-diret%c3%b3rio" class="question-hyperlink">Verifica&#231;&#227;o de extens&#227;o do arquivo e mudar o seu diret&#243;rio</a></div>
                        </div>
                    </div>

                

                            <div id="feed-link" class="js-feed-link">
        <a href="/feeds/question/201564" title="Feed of this question and its answers">
            <svg aria-hidden="true" class="fc-orange-400 svg-icon iconRss" width="18" height="18" viewBox="0 0 18 18"><path d="M1 3c0-1.1.9-2 2-2h12a2 2 0 012 2v12a2 2 0 01-2 2H3a2 2 0 01-2-2V3zm14.5 12C15.5 8.1 9.9 2.5 3 2.5V5a10 10 0 0110 10h2.5zm-5 0A7.5 7.5 0 003 7.5V10a5 5 0 015 5h2.5zm-5 0A2.5 2.5 0 003 12.5V15h2.5z"/></svg>
            Feed de perguntas
        </a>
    </div>
    <aside class="s-modal js-feed-link-modal" tabindex="-1" role="dialog" aria-labelledby="feed-modal-title" aria-describedby="feed-modal-description" aria-hidden="true">
        <div class="s-modal--dialog js-modal-dialog wmx4" role="document"  data-controller="se-draggable">
            <h1 class="s-modal--header fw-bold js-first-tabbable" id="feed-modal-title" data-target="se-draggable.handle" tabindex="0">
                Assine o RSS
            </h1>
            <div class="grid gs4 gsy fd-column">
                <div class="grid--cell">
                    <label class="d-block s-label c-default" for="feed-url">
                        Feed de perguntas
                        <p class="s-description mt2" id="feed-modal-description">Para assinar este feed RSS, copie e cole esta URL no seu leitor RSS.</p>
                    </label>
                </div>
                <div class="grid ps-relative">
                    <input class="s-input" type="text" name="feed-url" id="feed-url" readonly="readonly" value="https://pt.stackoverflow.com/feeds/question/201564" />
                    <svg aria-hidden="true" class="s-input-icon fc-orange-400 svg-icon iconRss" width="18" height="18" viewBox="0 0 18 18"><path d="M1 3c0-1.1.9-2 2-2h12a2 2 0 012 2v12a2 2 0 01-2 2H3a2 2 0 01-2-2V3zm14.5 12C15.5 8.1 9.9 2.5 3 2.5V5a10 10 0 0110 10h2.5zm-5 0A7.5 7.5 0 003 7.5V10a5 5 0 015 5h2.5zm-5 0A2.5 2.5 0 003 12.5V15h2.5z"/></svg>
                </div>
            </div>
            <a class="s-modal--close s-btn s-btn__muted js-modal-close js-last-tabbable" href="#" aria-label="Fechar">
                <svg aria-hidden="true" class="svg-icon iconClearSm" width="14" height="14" viewBox="0 0 14 14"><path d="M12 3.41L10.59 2 7 5.59 3.41 2 2 3.41 5.59 7 2 10.59 3.41 12 7 8.41 10.59 12 12 10.59 8.41 7 12 3.41z"/></svg>
            </a>
        </div>
    </aside>

            </div>
    </div>
<script>StackExchange.ready(function(){$.get('/posts/201564/ivc/cf7b');});</script>
<noscript><div><img src="/posts/201564/ivc/cf7b" class="dno" alt="" width="0" height="0"></div></noscript><div style="display:none" id="prettify-lang">lang-py</div></div>


        </div>
    </div>
        
<script>;try{(function(a){function b(a){return'string'==typeof a?document.getElementById(a):a}function c(a){return a=b(a),!!a&&'none'===getComputedStyle(a).display}function d(a){return!c(a)}function e(a){return!!a}function f(a){return /^\s*$/.test(b(a).innerHTML)}function g(a){var b=a.style;b.height=b.maxHeight=b.minHeight='auto',b.display='none',[].forEach.call(a.children,g)}function h(a,b){var c;return function(){return a&&(c=a.call(b||this,arguments),a=null),c}}function i(a){var b=document.createElement('script');b.src=a,document.body.appendChild(b)}function j(a){return k([],a)}function k(a,b){return a.push=function(a){return b(),delete this.push,this.push(a)},a}function l(){try{return!new Function('return async()=>{};')}catch(a){return!0}}function m(){return'undefined'!=typeof googletag&&!!googletag.apiReady}function n(){m()||(googletag={cmd:j(A)})}function o(){var a=document.createElement('div');a.className='adsbox',a.id='clc-abd',a.style.position='absolute',a.style.pointerEvents='none',a.innerHTML='&nbsp;',document.body.appendChild(a)}function p(){return Object.keys(E.ids)}function r(a){var b=E.ids[a],c=E.slots[b];'function'==typeof c&&(c=c(a));return{path:'/'+B+'/'+D+'/'+b+'/'+C,sizes:c,zone:b}}function q(a){try{Array.isArray(clc.dfp.slotsRenderedEvents)||(clc.dfp.slotsRenderedEvents=[]),clc.dfp.slotsRenderedEvents.push(a);var b=a.slot.getSlotElementId(),c=[];b||c.push('id=0');var d=document.getElementById(b);if(!b||d?d.hasAttribute('data-clc-stalled')&&c.push('st=1'):c.push('el=0'),0!==c.length)return void F(c.join('&'));var e=r(b),f=e.zone;if(clc.collapse&&clc.collapse[f]&&a.isEmpty)return g(d),void d.setAttribute('data-clc-ready','true');if(-1!==x.dh.indexOf(a.lineItemId))g(d);else if(a.lineItemId&&(d.setAttribute('data-clc-prefilled','true'),'dfp-msb'==b)){var h=document.getElementById('hireme');g(h)}d.setAttribute('data-clc-ready','true')}catch(a){var i=document.querySelector('#dfp-tsb, #dfp-isb, #clc-tsb');i&&i.setAttribute('data-clc-ready','true'),F('e=1')}}function s(a){return!(clc.collapse&&void 0!==clc.collapse[a])||!!clc.collapse[a]}function t(a,b){'dfp-isb'===a&&b.setTargeting('Sidebar',['Inline']),'dfp-tsb'===a&&b.setTargeting('Sidebar',['Right']);var c=r(a),d=c.path,e=c.sizes,f=c.zone,g=googletag.defineSlot(d,e,a);if(s(f)){var h=!x.ll;g.setCollapseEmptyDiv(!0,h)}g.addService(b),!1}function u(b){var c=a.dfp&&a.dfp.targeting||{};'SystemDefault'===c.ProductVariant&&(window.matchMedia&&window.matchMedia('(prefers-color-scheme: dark)').matches?c.ProductVariant='Dark':c.ProductVariant='Light'),Object.keys(c).forEach(function(a){b.setTargeting(a,c[a])})}function v(a){var g=a.map(b).filter(e);return{eligible:g.filter(f).filter(d),ineligible:g.filter(c)}}function w(b){void 0===b&&(b=p());var c=['dfp-mlb','dfp-smlb'];if(!m())return n(),void googletag.cmd.push(function(){return w(b)});var d=v(b),e=d.eligible,f=d.ineligible;if(f.forEach(g),0!==e.length){x.abd&&o(),googletag.destroySlots();var h=googletag.pubads();x.sf&&(h.setForceSafeFrame(!0),h.setSafeFrameConfig({allowOverlayExpansion:!0,allowPushExpansion:!0,sandbox:!0})),x.ll||h.enableSingleRequest(),a.sreEvent||(h.addEventListener('slotRenderEnded',q),a.sreEvent=!0),u(h);var i=e.filter(function(a){return!x.ll||0>c.indexOf(a.id)}),j=e.filter(function(a){return!!x.ll&&0<=c.indexOf(a.id)});i.forEach(function(a){t(a.id,h),a.setAttribute('data-dfp-zone','true')}),googletag.enableServices(),i.forEach(function(a){googletag.display(a.id)}),x.ll&&(h.enableLazyLoad({fetchMarginPercent:0,renderMarginPercent:0}),j.forEach(function(a){t(a.id,h),a.setAttribute('data-clc-prefilled','true')}),j.forEach(function(a){googletag.display(a.id)}))}}var x=function(a){for(var b=[],c=1;c<arguments.length;c++)b[c-1]=arguments[c];for(var d,e=0,f=b;e<f.length;e++)for(var g in d=f[e],d)a[g]=d[g];return a}({"lib":"https://cdn.sstatic.net/clc/clc.min.js?v=7dce99576e19","style":"https://cdn.sstatic.net/clc/styles/clc.min.css?v=ac5522400b2d","u":"https://clc.stackoverflow.com/markup.js","wa":true,"kt":2000,"tto":true,"h":"clc.stackoverflow.com","allowed":"^(((talent\\.)?stackoverflow)|(blog\\.codinghorror)|(serverfault|askubuntu)|([^\\.]+\\.stackexchange))\\.com$","wv":true,"al":false,"dh":[5171832659],"abd":true},a.options||{}),y=h(function(){var a=x.lib;l()&&(a=a.replace(/(\.min)?\.js(\?v=[0-9a-fA-F]+)?$/,'.ie$1.js$2')),i(a)}),z=a.cmd||[];Array.isArray(z)&&(0<z.length?y():k(z,y));var A=h(function(){i('https://www.googletagservices.com/tag/js/gpt.js')}),B='248424177',C=/^\/tags\//.test(location.pathname)||/^\/questions\/tagged\//.test(location.pathname)?'tag-pages':/^\/$/.test(location.pathname)||/^\/home/.test(location.pathname)?'home-page':'question-pages',D=location.hostname;var E={slots:{lb:[[728,90]],mlb:[[728,90]],smlb:[[728,90]],bmlb:[[728,90]],sb:function(a){return'dfp-tsb'===a?[[300,250],[300,600]]:[[300,250]]},"tag-sponsorship":[[730,135]],"mobile-below-question":[[320,50],[300,250]],msb:[[300,250],[300,600]]},ids:{"dfp-tlb":'lb',"dfp-mlb":'mlb',"dfp-smlb":'smlb',"dfp-bmlb":'bmlb',"dfp-tsb":'sb',"dfp-isb":'sb',"dfp-tag":'tag-sponsorship',"dfp-msb":'msb',"dfp-m-aq":'mobile-below-question',"clc-tlb":'lb',"clc-mlb":'mlb',"clc-tsb":'sb'}},F=function(a){new Image().src='https://'+x.h+'/stalled.gif?'+a};(function(){var b=x.al;b&&z.push(function(){return a.load()})})(),n(),a.dfp={load:w},a.options=x,a.cmd=z})(this.clc=this.clc||{})}catch(a){window.console.error(a)}</script>    <script>
        var clc = clc || {};
        clc.collapse = { sb: !0, 'tag-sponsorship': !0, lb:!0, mlb:!0, smlb:!0, bmlb:!0, 'mobile-below-question':!0};
        clc.options = clc.options || {};
        clc.options.sf = !1;
        clc.options.hb = !1;
        clc.options.ll = !0;
        clc.dfp = clc.dfp || {};
        clc.dfp.targeting = {Registered:['false'],'pt.so-tag':['python'],NumberOfAnswers:['3']};
        var googletag = googletag || {};
        googletag.cmd = googletag.cmd || [];
        googletag.cmd.push(function () { clc.dfp.load(); });

    </script>

            <footer id="footer" class="site-footer js-footer" role="contentinfo">
        <div class="site-footer--container">
            <nav class="site-footer--nav">
                    <div class="site-footer--col site-footer--col__visible js-footer-col" data-name="default">
                        <h5 class="-title"><a href="/">Stack Overflow em Portugu&#xEA;s</a></h5>
                        <ul class="-list js-primary-footer-links">
                                    <li class="-item"><a class="js-gps-track -link" data-gps-track="footer.click({ location: 2, link: 2 })" href="/tour">Tour</a></li>
                                <li class="-item"><a href="/help" class="js-gps-track -link" data-gps-track="footer.click({ location: 2, link: 3 })">Ajuda</a></li>
                                    <li class="-item"><a class="js-gps-track -link" data-gps-track="footer.click({ location: 2, link: 5 })" href="https://chat.stackexchange.com?tab=site&host=pt.stackoverflow.com">Chat</a></li>
                            <li class="-item"><a class="js-gps-track -link" data-gps-track="footer.click({ location: 2, link: 13 })" href="/contact">Contato</a></li>
                                <li class="-item"><a class="js-gps-track -link" data-gps-track="footer.click({ location: 2, link: 14 })" href="https://pt.meta.stackoverflow.com">Feedback</a></li>
                                <li class="-item"><a onclick='StackExchange.switchMobile("on")' class="js-gps-track -link" data-gps-track="footer.click({ location: 2, link: 12 })">M&#xF3;vel</a></li>
                        </ul>
                    </div>
                <div class="site-footer--col site-footer--col__visible js-footer-col" data-name="default">
                    <h5 class="-title"><a class="js-gps-track" data-gps-track="footer.click({ location: 2, link: 1 })" href="https://stackoverflow.com/company/about">Empresa</a></h5>
                    <ul class="-list">
                            <li class="-item"><a href="https://stackoverflow.com" class="js-gps-track -link" data-gps-track="footer.click({ location: 2, link: 15})">Stack Overflow</a></li>
                            <li class="-item"><a href="https://stackoverflowbusiness.com" class="js-gps-track -link" data-gps-track="footer.click({ location: 2, link: 19 })">Stack Overflow Business</a></li>
                            <li class="-item"><a href="https://stackoverflow.com/jobs" class="js-gps-track -link" data-gps-track="footer.click({ location: 2, link: 17})">Developer Jobs</a></li>
                                <li class="-item"><a class="js-gps-track -link" data-gps-track="footer.click({ location: 2, link: 1 })" href="https://stackoverflow.com/company/about">Sobre</a></li>
                        <li class="-item"><a class="js-gps-track -link" data-gps-track="footer.click({ location: 2, link: 27 })" href="https://stackoverflow.com/company/press">Imprensa</a></li>
                        <li class="-item"><a class="js-gps-track -link" data-gps-track="footer.click({ location: 2, link: 7 })" href="https://stackoverflow.com/legal">Legal</a></li>
                        <li class="-item"><a class="js-gps-track -link" data-gps-track="footer.click({ location: 2, link: 8 })" href="https://stackoverflow.com/legal/privacy-policy">Pol&#xED;tica de Privacidade</a></li>
                    </ul>
                </div>
                <div class="site-footer--col site-footer--categories-nav site-footer--col__visible">
                    <a href="#" class="site-footer--back js-footer-back"><svg aria-hidden="true" class="svg-icon iconArrowLeftAlt" width="18" height="18" viewBox="0 0 18 18"><path d="M10.58 16L12 14.59 6.4 9 12 3.41 10.57 2l-7 7 7 7z"/></svg></a>
                    <div>
                        <h5 class="-title"><a href="https://stackexchange.com" data-gps-track="footer.click({ location: 2, link: 30 })">Stack Exchange<br> Network</a></h5>
                        <ul class="-list">
                            <li class="-item"><a href="#" class="-link _expandable js-footer-category-trigger js-gps-track" data-gps-track="footer.click({ location: 2, link: 24 })" data-target="Technology">Technology</a></li>
                            <li class="-item"><a href="#" class="-link _expandable js-footer-category-trigger js-gps-track" data-gps-track="footer.click({ location: 2, link: 24 })" data-target="Life / Arts">Life / Arts</a></li>
                            <li class="-item"><a href="#" class="-link _expandable js-footer-category-trigger js-gps-track" data-gps-track="footer.click({ location: 2, link: 24 })" data-target="Culture / Recreation">Culture / Recreation</a></li>
                            <li class="-item"><a href="#" class="-link _expandable js-footer-category-trigger js-gps-track" data-gps-track="footer.click({ location: 2, link: 24 })" data-target="Science">Science</a></li>
                            <li class="-item"><a href="#" class="-link _expandable js-footer-category-trigger js-gps-track" data-gps-track="footer.click({ location: 2, link: 24 })" data-target="Other">Other</a></li>
                        </ul>
                    </div>
                </div>
                <div class="site-footer--categories">
                        <div class="site-footer--col site-footer--category js-footer-col" data-name="Technology">
        <ul class="-list">
                <li class="-item"><a href="https://stackoverflow.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="professional and enthusiast programmers">Stack Overflow</a></li>
                <li class="-item"><a href="https://serverfault.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="system and network administrators">Server Fault</a></li>
                <li class="-item"><a href="https://superuser.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="computer enthusiasts and power users">Super User</a></li>
                <li class="-item"><a href="https://webapps.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="power users of web applications">Web Applications</a></li>
                <li class="-item"><a href="https://askubuntu.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="Ubuntu users and developers">Ask Ubuntu</a></li>
                <li class="-item"><a href="https://webmasters.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="pro webmasters">Webmasters</a></li>
                <li class="-item"><a href="https://gamedev.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="professional and independent game developers">Game Development</a></li>
                    </ul></div><div class="site-footer--col site-footer--category js-footer-col" data-name="Technology"><ul class="-list">
                <li class="-item"><a href="https://tex.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="users of TeX, LaTeX, ConTeXt, and related typesetting systems">TeX - LaTeX</a></li>
                <li class="-item"><a href="https://softwareengineering.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="professionals, academics, and students working within the systems development life cycle">Software Engineering</a></li>
                <li class="-item"><a href="https://unix.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="users of Linux, FreeBSD and other Un*x-like operating systems">Unix &amp; Linux</a></li>
                <li class="-item"><a href="https://apple.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="power users of Apple hardware and software">Ask Different (Apple)</a></li>
                <li class="-item"><a href="https://wordpress.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="WordPress developers and administrators">WordPress Development</a></li>
                <li class="-item"><a href="https://gis.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="cartographers, geographers and GIS professionals">Geographic Information Systems</a></li>
                <li class="-item"><a href="https://electronics.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="electronics and electrical engineering professionals, students, and enthusiasts">Electrical Engineering</a></li>
                    </ul></div><div class="site-footer--col site-footer--category js-footer-col" data-name="Technology"><ul class="-list">
                <li class="-item"><a href="https://android.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="enthusiasts and power users of the Android operating system">Android Enthusiasts</a></li>
                <li class="-item"><a href="https://security.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="information security professionals">Information Security</a></li>
                <li class="-item"><a href="https://dba.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="database professionals who wish to improve their database skills and learn from others in the community">Database Administrators</a></li>
                <li class="-item"><a href="https://drupal.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="Drupal developers and administrators">Drupal Answers</a></li>
                <li class="-item"><a href="https://sharepoint.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="SharePoint enthusiasts">SharePoint</a></li>
                <li class="-item"><a href="https://ux.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="user experience researchers and experts">User Experience</a></li>
                <li class="-item"><a href="https://mathematica.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="users of Wolfram Mathematica">Mathematica</a></li>
                    </ul></div><div class="site-footer--col site-footer--category js-footer-col" data-name="Technology"><ul class="-list">
                <li class="-item"><a href="https://salesforce.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="Salesforce administrators, implementation experts, developers and anybody in-between">Salesforce</a></li>
                <li class="-item"><a href="https://expressionengine.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="administrators, end users, developers and designers for ExpressionEngine&#xAE; CMS">ExpressionEngine&#xAE; Answers</a></li>
                <li class="-item"><a href="https://pt.stackoverflow.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="programadores profissionais e entusiastas">Stack Overflow em Portugu&#xEA;s</a></li>
                <li class="-item"><a href="https://blender.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="people who use Blender to create 3D graphics, animations, or games">Blender</a></li>
                <li class="-item"><a href="https://networkengineering.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="network engineers">Network Engineering</a></li>
                <li class="-item"><a href="https://crypto.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="software developers, mathematicians and others interested in cryptography">Cryptography</a></li>
                <li class="-item"><a href="https://codereview.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="peer programmer code reviews">Code Review</a></li>
                    </ul></div><div class="site-footer--col site-footer--category js-footer-col" data-name="Technology"><ul class="-list">
                <li class="-item"><a href="https://magento.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="users of the Magento e-Commerce platform">Magento</a></li>
                <li class="-item"><a href="https://softwarerecs.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="people seeking specific software recommendations">Software Recommendations</a></li>
                <li class="-item"><a href="https://dsp.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="practitioners of the art and science of signal, image and video processing">Signal Processing</a></li>
                <li class="-item"><a href="https://emacs.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="those using, extending or developing Emacs">Emacs</a></li>
                <li class="-item"><a href="https://raspberrypi.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="users and developers of hardware and software for Raspberry Pi">Raspberry Pi</a></li>
                <li class="-item"><a href="https://ru.stackoverflow.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="&#x43F;&#x440;&#x43E;&#x433;&#x440;&#x430;&#x43C;&#x43C;&#x438;&#x441;&#x442;&#x43E;&#x432;">Stack Overflow &#x43D;&#x430; &#x440;&#x443;&#x441;&#x441;&#x43A;&#x43E;&#x43C;</a></li>
                <li class="-item"><a href="https://codegolf.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="programming puzzle enthusiasts and code golfers">Code Golf</a></li>
                    </ul></div><div class="site-footer--col site-footer--category js-footer-col" data-name="Technology"><ul class="-list">
                <li class="-item"><a href="https://es.stackoverflow.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="programadores y profesionales de la inform&#xE1;tica">Stack Overflow en espa&#xF1;ol</a></li>
                <li class="-item"><a href="https://ethereum.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="users of Ethereum, the decentralized application platform and smart contract enabled blockchain">Ethereum</a></li>
                <li class="-item"><a href="https://datascience.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="Data science professionals, Machine Learning specialists, and those interested in learning more about the field">Data Science</a></li>
                <li class="-item"><a href="https://arduino.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="developers of open-source hardware and software that is compatible with Arduino">Arduino</a></li>
                <li class="-item"><a href="https://bitcoin.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="Bitcoin crypto-currency enthusiasts">Bitcoin</a></li>
                <li class="-item"><a href="https://sqa.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="software quality control experts, automation engineers, and software testers">Software Quality Assurance &amp; Testing</a></li>
                <li class="-item"><a href="https://sound.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="sound engineers, producers, editors, and enthusiasts">Sound Design</a></li>
                    </ul></div><div class="site-footer--col site-footer--category js-footer-col" data-name="Technology"><ul class="-list">
                <li class="-item"><a href="https://windowsphone.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="enthusiasts and power users of Windows Phone OS">Windows Phone</a></li>
                <li class="-item">
                    <a href="https://stackexchange.com/sites#technology" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 26 })">
                        <strong>
                            more (28)
                        </strong>
                    </a>
                </li>
        </ul>
    </div>
    <div class="site-footer--col site-footer--category js-footer-col" data-name="Life / Arts">
        <ul class="-list">
                <li class="-item"><a href="https://photo.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="professional, enthusiast and amateur photographers">Photography</a></li>
                <li class="-item"><a href="https://scifi.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="science fiction and fantasy enthusiasts">Science Fiction &amp; Fantasy</a></li>
                <li class="-item"><a href="https://graphicdesign.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="Graphic Design professionals, students, and enthusiasts">Graphic Design</a></li>
                <li class="-item"><a href="https://movies.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="movie and TV enthusiasts">Movies &amp; TV</a></li>
                <li class="-item"><a href="https://music.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="musicians, students, and enthusiasts">Music: Practice &amp; Theory</a></li>
                <li class="-item"><a href="https://worldbuilding.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="writers/artists using science, geography and culture to construct imaginary worlds and settings">Worldbuilding</a></li>
                <li class="-item"><a href="https://video.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation">Video Production</a></li>
                    </ul></div><div class="site-footer--col site-footer--category js-footer-col" data-name="Life / Arts"><ul class="-list">
                <li class="-item"><a href="https://cooking.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="professional and amateur chefs">Seasoned Advice (cooking)</a></li>
                <li class="-item"><a href="https://diy.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="contractors and serious DIYers">Home Improvement</a></li>
                <li class="-item"><a href="https://money.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="people who want to be financially literate">Personal Finance &amp; Money</a></li>
                <li class="-item"><a href="https://academia.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="academics and those enrolled in higher education">Academia</a></li>
                <li class="-item"><a href="https://law.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="legal professionals, students, and others with experience or interest in law">Law</a></li>
                <li class="-item"><a href="https://fitness.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="physical fitness professionals, athletes, trainers, and those providing health-related needs">Physical Fitness</a></li>
                <li class="-item"><a href="https://gardening.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="gardeners and landscapers">Gardening &amp; Landscaping</a></li>
                    </ul></div><div class="site-footer--col site-footer--category js-footer-col" data-name="Life / Arts"><ul class="-list">
                <li class="-item"><a href="https://parenting.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="parents, grandparents, nannies and others with a parenting role">Parenting</a></li>
                <li class="-item">
                    <a href="https://stackexchange.com/sites#lifearts" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 26 })">
                        <strong>
                            more (10)
                        </strong>
                    </a>
                </li>
        </ul>
    </div>
    <div class="site-footer--col site-footer--category js-footer-col" data-name="Culture / Recreation">
        <ul class="-list">
                <li class="-item"><a href="https://english.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="linguists, etymologists, and serious English language enthusiasts">English Language &amp; Usage</a></li>
                <li class="-item"><a href="https://skeptics.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="scientific skepticism">Skeptics</a></li>
                <li class="-item"><a href="https://judaism.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="those who base their lives on Jewish law and tradition and anyone interested in learning more">Mi Yodeya (Judaism)</a></li>
                <li class="-item"><a href="https://travel.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="road warriors and seasoned travelers">Travel</a></li>
                <li class="-item"><a href="https://christianity.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="committed Christians, experts in Christianity and those interested in learning more">Christianity</a></li>
                <li class="-item"><a href="https://ell.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="speakers of other languages learning English">English Language Learners</a></li>
                <li class="-item"><a href="https://japanese.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="students, teachers, and linguists wanting to discuss the finer points of the Japanese language">Japanese Language</a></li>
                    </ul></div><div class="site-footer--col site-footer--category js-footer-col" data-name="Culture / Recreation"><ul class="-list">
                <li class="-item"><a href="https://chinese.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="students, teachers, and linguists wanting to discuss the finer points of the Chinese language">Chinese Language</a></li>
                <li class="-item"><a href="https://french.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="students, teachers, and linguists wanting to discuss the finer points of the French language">French Language</a></li>
                <li class="-item"><a href="https://german.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="speakers of German wanting to discuss the finer points of the language and translation">German Language</a></li>
                <li class="-item"><a href="https://hermeneutics.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="professors, theologians, and those interested in exegetical analysis of biblical texts">Biblical Hermeneutics</a></li>
                <li class="-item"><a href="https://history.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="historians and history buffs">History</a></li>
                <li class="-item"><a href="https://spanish.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="linguists, teachers, students and Spanish language enthusiasts in general wanting to discuss the finer points of the language">Spanish Language</a></li>
                <li class="-item"><a href="https://islam.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="Muslims, experts in Islam, and those interested in learning more about Islam">Islam</a></li>
                    </ul></div><div class="site-footer--col site-footer--category js-footer-col" data-name="Culture / Recreation"><ul class="-list">
                <li class="-item"><a href="https://rus.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="&#x43B;&#x438;&#x43D;&#x433;&#x432;&#x438;&#x441;&#x442;&#x43E;&#x432; &#x438; &#x44D;&#x43D;&#x442;&#x443;&#x437;&#x438;&#x430;&#x441;&#x442;&#x43E;&#x432; &#x440;&#x443;&#x441;&#x441;&#x43A;&#x43E;&#x433;&#x43E; &#x44F;&#x437;&#x44B;&#x43A;&#x430;">&#x420;&#x443;&#x441;&#x441;&#x43A;&#x438;&#x439; &#x44F;&#x437;&#x44B;&#x43A;</a></li>
                <li class="-item"><a href="https://russian.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="students, teachers, and linguists wanting to discuss the finer points of the Russian language">Russian Language</a></li>
                <li class="-item"><a href="https://gaming.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="passionate videogamers on all platforms">Arqade (gaming)</a></li>
                <li class="-item"><a href="https://bicycles.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="people who build and repair bicycles, people who train cycling, or commute on bicycles">Bicycles</a></li>
                <li class="-item"><a href="https://rpg.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="gamemasters and players of tabletop, paper-and-pencil role-playing games">Role-playing Games</a></li>
                <li class="-item"><a href="https://anime.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="anime and manga fans">Anime &amp; Manga</a></li>
                <li class="-item"><a href="https://puzzling.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="those who create, solve, and study puzzles">Puzzling</a></li>
                    </ul></div><div class="site-footer--col site-footer--category js-footer-col" data-name="Culture / Recreation"><ul class="-list">
                <li class="-item"><a href="https://mechanics.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="mechanics and DIY enthusiast owners of cars, trucks, and motorcycles">Motor Vehicle Maintenance &amp; Repair</a></li>
                <li class="-item"><a href="https://boardgames.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="people who like playing board games, designing board games or modifying the rules of existing board games">Board &amp; Card Games</a></li>
                <li class="-item"><a href="https://bricks.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="LEGO&#xAE; and building block enthusiasts">Bricks</a></li>
                <li class="-item"><a href="https://homebrew.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="dedicated home brewers and serious enthusiasts">Homebrewing</a></li>
                <li class="-item"><a href="https://martialarts.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="students and teachers of all martial arts">Martial Arts</a></li>
                <li class="-item"><a href="https://outdoors.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="people who love being outdoors enjoying nature and wilderness, and learning about the required skills and equipment">The Great Outdoors</a></li>
                <li class="-item"><a href="https://poker.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="serious players and enthusiasts of poker">Poker</a></li>
                    </ul></div><div class="site-footer--col site-footer--category js-footer-col" data-name="Culture / Recreation"><ul class="-list">
                <li class="-item"><a href="https://chess.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="serious players and enthusiasts of chess">Chess</a></li>
                <li class="-item"><a href="https://sports.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="participants in team and individual sport activities">Sports</a></li>
                <li class="-item">
                    <a href="https://stackexchange.com/sites#culturerecreation" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 26 })">
                        <strong>
                            more (16)
                        </strong>
                    </a>
                </li>
        </ul>
    </div>
    <div class="site-footer--col site-footer--category js-footer-col" data-name="Science">
        <ul class="-list">
                <li class="-item"><a href="https://mathoverflow.net" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="professional mathematicians">MathOverflow</a></li>
                <li class="-item"><a href="https://math.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="people studying math at any level and professionals in related fields">Mathematics</a></li>
                <li class="-item"><a href="https://stats.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="people interested in statistics, machine learning, data analysis, data mining, and data visualization">Cross Validated (stats)</a></li>
                <li class="-item"><a href="https://cstheory.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="theoretical computer scientists and researchers in related fields">Theoretical Computer Science</a></li>
                <li class="-item"><a href="https://physics.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="active researchers, academics and students of physics">Physics</a></li>
                <li class="-item"><a href="https://chemistry.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="scientists, academics, teachers, and students in the field of chemistry">Chemistry</a></li>
                <li class="-item"><a href="https://biology.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="biology researchers, academics, and students">Biology</a></li>
                    </ul></div><div class="site-footer--col site-footer--category js-footer-col" data-name="Science"><ul class="-list">
                <li class="-item"><a href="https://cs.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="students, researchers and practitioners of computer science">Computer Science</a></li>
                <li class="-item"><a href="https://philosophy.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="those interested in the study of the fundamental nature of knowledge, reality, and existence">Philosophy</a></li>
                <li class="-item"><a href="https://linguistics.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="professional linguists and others with an interest in linguistic research and theory">Linguistics</a></li>
                <li class="-item"><a href="https://psychology.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="practitioners, researchers, and students in cognitive science, psychology, neuroscience, and psychiatry">Psychology &amp; Neuroscience</a></li>
                <li class="-item"><a href="https://scicomp.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="scientists using computers to solve scientific problems">Computational Science</a></li>
                <li class="-item">
                    <a href="https://stackexchange.com/sites#science" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 26 })">
                        <strong>
                            more (10)
                        </strong>
                    </a>
                </li>
        </ul>
    </div>
    <div class="site-footer--col site-footer--category js-footer-col" data-name="Other">
        <ul class="-list">
                <li class="-item"><a href="https://meta.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="meta-discussion of the Stack Exchange family of Q&amp;A websites">Meta Stack Exchange</a></li>
                <li class="-item"><a href="https://stackapps.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="apps, scripts, and development with the Stack Exchange API">Stack Apps</a></li>
                <li class="-item"><a href="https://api.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="programmatic interaction with Stack Exchange sites">API</a></li>
                <li class="-item"><a href="https://data.stackexchange.com" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 25 })" title="querying Stack Exchange data using SQL">Data</a></li>
        </ul>
    </div>

                </div>
            </nav>
            <div class="site-footer--copyright fs-fine">
                <ul class="-list">
                    <li class="-item"><a class="js-gps-track -link" data-gps-track="footer.click({ location: 2, link:4 })" href="https://stackoverflow.blog?blb=1">Blog</a></li>
                    <li class="-item"><a href="https://www.facebook.com/officialstackoverflow/" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 31 })">Facebook</a></li>
                    <li class="-item"><a href="https://twitter.com/stackoverflow" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 32 })">Twitter</a></li>
                    <li class="-item"><a href="https://linkedin.com/company/stack-overflow" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 33 })">LinkedIn</a></li>
                    <li class="-item"><a href="https://www.instagram.com/thestackoverflow" class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 36 })">Instagram</a></li>
                </ul>

                <p class="mt-auto mb24">
site design / logo &#169; 2020 Stack Exchange Inc; contribui&#231;&#245;es de usu&#225;rios licenciadas sob <a href="https://stackoverflow.com/help/licensing">cc by-sa</a>.                    <span id="svnrev">rev&nbsp;2020.6.18.37100</span>
                </p>
            </div>
        </div>

    </footer>

            <script>StackExchange.ready(function () { StackExchange.responsiveness.addSwitcher(); })</script>
    <noscript>
        <div id="noscript-warning">Stack Overflow em Portugu&#xEA;s funciona melhor com o JavaScript ativado
            <img src="https://pixel.quantserve.com/pixel/p-c1rF4kxgLUzNc.gif" alt="" class="dno">
        </div>
    </noscript>

        <script>
(function(i, s, o, g, r, a, m) {
                i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function() { (i[r].q = i[r].q || []).push(arguments) }, i[r].l = 1 * new Date(); a = s.createElement(o),
                m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m);
            })(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');

            StackExchange.ready(function () {

                StackExchange.ga.init({
                    sendTitles: true,
                    tracker: window.ga,
                    trackingCodes: [
                        'UA-108242619-5'
                    ],
                        checkDimension: 'dimension42'
                });



                    StackExchange.ga.setDimension('dimension2', '|python|');

                    StackExchange.ga.setDimension('dimension3', 'Questions/Show');


                StackExchange.ga.trackPageView();
            });
            /**/

            var _qevents = _qevents || [],
            _comscore = _comscore || [];
            (function() {
                var ssl = 'https:' == document.location.protocol,
                    s = document.getElementsByTagName('script')[0],
                    qc = document.createElement('script');
 qc.async = true;
                    qc.src = (ssl ? 'https://secure' : 'http://edge') + '.quantserve.com/quant.js';
                    s.parentNode.insertBefore(qc, s);
                    _qevents.push({ qacct: "p-c1rF4kxgLUzNc" });/**/
 var sc = document.createElement('script');
                    sc.async = true;
                    sc.src = (ssl ? 'https://sb' : 'http://b') + '.scorecardresearch.com/beacon.js';
                    s.parentNode.insertBefore(sc, s);
                    _comscore.push({ c1: "2", c2: "17440561" });            })();
            
</script>

    
    </body>
    </html>
